diff --git a/.gitignore b/.gitignore index 2858192..9d11bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +content/* blog/* diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..709a0e7 --- /dev/null +++ b/book.toml @@ -0,0 +1,30 @@ +[book] +title = "Blog" +description = "Stories, adventures, and reflections from life's journey" +authors = ["Matthew Binning"] +language = "en" +multilingual = false +src = "content" + +[build] +build-dir = "blog" +create-missing = false + +[output.html] +no-section-label = true +git-repository-url = "https://forgejo.binning.net/matthew.binning/www" +site-url = "/blog/" +default-theme = "light" +preferred-dark-theme = "light" +curly-quotes = true +mathjax-support = false +copy-fonts = false +additional-css = ["theme/sepia.css"] + +[output.html.fold] +enable = true +level = 0 + +[output.html.playground] +editable = false +copyable = false diff --git a/deploy.sh b/deploy.sh index 94fd863..5890ec8 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,8 +2,12 @@ set -e +# Build the blog with mdbook before deploying +printf "Building blog with mdbook...\n" +mdbook build + # Common files to deploy (shared between staging and prod) -DEPLOY_FILES="blog includes index.html blog.html resume.html style.css 404.html" +DEPLOY_FILES="blog includes index.html resume.html style.css 404.html" # Usage information usage() { @@ -61,7 +65,7 @@ case $ENV in ssh ${REMOTE_HOST} "mkdir -p /tmp/${REMOTE_PATH}" rsync -avz --delete ${DEPLOY_FILES} ${REMOTE_HOST}:/tmp/${REMOTE_PATH}/ # Set proper permissions and move config on remote server - ssh ${REMOTE_HOST} "sudo mv /tmp/${REMOTE_PATH} ${REMOTE_PATH} && \ + ssh ${REMOTE_HOST} "sudo rsync -avz --delete /tmp/${REMOTE_PATH} ${REMOTE_PATH} && \ sudo chown -R nginx:nginx ${REMOTE_PATH}/ && \ printf 'Content deployed.\n'" diff --git a/includes/navbar.html b/includes/navbar.html index 7286aa7..7885fb8 100644 --- a/includes/navbar.html +++ b/includes/navbar.html @@ -2,7 +2,7 @@