diff --git a/.gitignore b/.gitignore index 6612d23..f66e219 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -book -blog/* +blog/ +src content/* -content-minimal/* +example/* diff --git a/book.toml b/book.toml index 3c710aa..2dc9c92 100644 --- a/book.toml +++ b/book.toml @@ -2,7 +2,6 @@ authors = ["Matthew Binning"] language = "en" multilingual = false -src = "content" title = "The Bin" [build] diff --git a/deploy.sh b/deploy.sh index b024f8e..b2d4dc7 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,11 +4,9 @@ set -e # Build the blog with mdbook before deploying printf "Building blog with mdbook...\n" +[ -s src ] || ln -s /var/lib/www src mdbook build -# Common files to deploy (shared between staging and prod) -DEPLOY_FILES="blog includes index.html menu.html resume.html style.css 404.html cover.jpg" - # Usage information usage() { printf "Usage: %s [staging|prod]\n\n staging - Deploy to local staging environment (/srv/www/stage.binning.net)\n prod - Deploy to production server via SSH (www.binning.net)\n\nExample:\n %s staging\n %s prod\n" "$0" "$0" "$0" @@ -34,7 +32,8 @@ case $ENV in # Deploy website files via rsync printf "Deploying website files...\n" - sudo rsync -av --delete ${DEPLOY_FILES} ${STAGING_PATH}/ + sudo rsync -av --delete main/* ${STAGING_PATH}/ + sudo rsync -av --delete blog ${STAGING_PATH}/ # Set proper ownership sudo chown -R nginx:nginx ${STAGING_PATH}/ diff --git a/404.html b/main/404.html similarity index 100% rename from 404.html rename to main/404.html diff --git a/blog.html b/main/blog.html similarity index 100% rename from blog.html rename to main/blog.html diff --git a/main/cover.jpg b/main/cover.jpg new file mode 100644 index 0000000..02fb43b Binary files /dev/null and b/main/cover.jpg differ diff --git a/includes/footer.html b/main/includes/footer.html similarity index 100% rename from includes/footer.html rename to main/includes/footer.html diff --git a/includes/navbar.html b/main/includes/navbar.html similarity index 100% rename from includes/navbar.html rename to main/includes/navbar.html diff --git a/index.html b/main/index.html similarity index 100% rename from index.html rename to main/index.html diff --git a/menu.html b/main/menu.html similarity index 100% rename from menu.html rename to main/menu.html diff --git a/resume.html b/main/resume.html similarity index 100% rename from resume.html rename to main/resume.html diff --git a/style.css b/main/style.css similarity index 100% rename from style.css rename to main/style.css