Skip to content

Commit

Permalink
add setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hippieZhou committed Sep 16, 2024
1 parent ab9b59b commit a2b7426
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
22 changes: 22 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

nvm use

if [ -d "src/themes/oranges" ]; then
git submodule update --init --recursive
else
git submodule add https://github.com/zchengsite/hexo-theme-oranges.git src/themes/oranges
fi

npm install

cd src

npm install

echo "Setup completed. Required npm packages installed."

hexo s
7 changes: 7 additions & 0 deletions src/source/_posts/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ mv src/.github/ .
mv src/.gitignore .
```

try to use `setup.sh` to setup:

```bash
chmod +x setup.sh
./setup.sh
```

### apply third party theme

```bash
Expand Down

0 comments on commit a2b7426

Please sign in to comment.