-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
35 lines (29 loc) · 793 Bytes
/
justfile
File metadata and controls
35 lines (29 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
all: clean build
prepare: prepare-dev prepare-deploy
run:
# Run the server
hexo serve
build:
# Copy the new posts to the folder
find contents/ -type f -name "*.md" -exec cp {} source/_posts/ \;
find contents/ -type f -name "*.png" -exec cp {} source/images/ \;
find contents/ -type f -name "*.svg" -exec cp {} source/images/ \;
find contents/ -type f -name "*.jpg" -exec cp {} source/images/ \;
# Copy images
cp images/* source/images/
# Generate the site
hexo generate
clean:
# Clean static site
hexo clean
# Remove the old posts
rm -rf source/_posts/*
prepare-dev:
# Install pre-commit
pipx install pre-commit
pre-commit install --install-hooks
prepare-deploy:
# Install hexo
npm install -g hexo-cli
# Install necessary packages
npm install