From e21bb6439cd67e285ddf6bb66e9e6a6d6b3ab80d Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Fri, 6 Sep 2024 01:16:27 -0500 Subject: [PATCH] Add built in templates --- .github/workflows/deploy-site.yml | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/command_reference.dj | 3 +- docs/template.html | 1122 ------------------------- docs/templating.md | 6 +- src/main.rs | 17 +- src/templates.rs | 1291 +++++++++++++++++++++++++++++ src/tests.rs | 2 + 9 files changed, 1318 insertions(+), 1129 deletions(-) delete mode 100644 docs/template.html create mode 100644 src/templates.rs diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 46da42e..6cf2ff1 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -21,7 +21,7 @@ jobs: run: cargo install simple-ssg - name: Generate static site - run: ~/.cargo/bin/simple-ssg --clean ./docs -o ./output + run: ~/.cargo/bin/simple-ssg --clean ./docs -o ./output -t github-markdown - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 diff --git a/Cargo.lock b/Cargo.lock index 77d0864..3ee39de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -331,7 +331,7 @@ dependencies = [ [[package]] name = "simple-ssg" -version = "3.0.3" +version = "3.1.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index a753247..5cd5cdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ authors = ["Ryan Brue "] repository = "https://github.com/ryanabx/simple-ssg" license = "MIT" readme = "README.md" -version = "3.0.3" +version = "3.1.0" edition = "2021" description = "Plain and simple static site generator for Djot and Markdown light markup languages" diff --git a/docs/command_reference.dj b/docs/command_reference.dj index 06a4e1d..3564453 100644 --- a/docs/command_reference.dj +++ b/docs/command_reference.dj @@ -25,10 +25,11 @@ simple-ssg ### Options ``` --o Optional output path override. Defaults to ./output + -o Optional output path override. Defaults to ./output --clean Clean the output directory before generating the site. Useful for multiple runs --no-warn Disallow any warnings --web-prefix Specify the website prefix (defaults to local paths i.e. `./`) + -t, --template