Skip to content

Commit

Permalink
template vars for CSS and JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfect5th committed Jan 22, 2024
1 parent 3da3b12 commit f30ecea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ wait
mkdir -p ./_site/css
mkdir -p ./_site/js
mkdir -p ./_site/fonts
cp ./css/base.css ./_site/css/base.css
cp ./js/main.js ./_site/js/main.js
cp ./favicon.ico ./_site/favicon.ico
sed -e "s:{{SITE_ROOT}}:$SITE_ROOT:g" ./css/base.css > ./_site/css/base.css
sed -e "s:{{SITE_ROOT}}:$SITE_ROOT:g" ./js/main.js > ./_site/js/main.js
cp ./fonts/* ./_site/fonts/ || true
8 changes: 5 additions & 3 deletions env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export SITE_ROOT="/simple-site"
export SITE_TITLE="Simple Site"
export CRUMBS="YES"
[ -z "$SITE_ROOT" ] && export SITE_ROOT="/simple-site"
[ -z "$SITE_TITLE" ] && export SITE_TITLE="Simple Site"
[ -z "$CRUMBS" ] && export CRUMBS="YES"

[ "$SITE_ROOT" = "/" ] && export SITE_ROOT=""

0 comments on commit f30ecea

Please sign in to comment.