Skip to content

Commit 06fb02b

Browse files
Merge pull request #198 from sebastienrousseau/feat/ssg
Feat/ssg
2 parents a75c483 + a0dabcd commit 06fb02b

18 files changed

+398
-246
lines changed

Cargo.lock

+80-83
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "ssg"
2020
readme = "README.md"
2121
repository = "https://github.com/sebastienrousseau/shokunin"
2222
rust-version = "1.71.1"
23-
version = "0.0.25"
23+
version = "0.0.26"
2424
include = [
2525
"/CONTRIBUTING.md",
2626
"/LICENSE-APACHE",
@@ -67,7 +67,8 @@ printpdf = "0.7.0"
6767
pulldown-cmark = "0.10.0"
6868
uuid = { version = "1.7.0", features = ["v4"] }
6969

70-
[target.'cfg(unix)'.dependencies]
70+
# Unix platforms use OpenSSL for now to provide SSL functionality
71+
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
7172
openssl = { version = "0.10.64", features = ["vendored"] }
7273

7374
[dev-dependencies]

EXAMPLES.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Shokunin Static Site Generator (SSG)
2+
3+
The fastest Rust-based Static Site Generator (SSG) for building professional
4+
websites and blogs.
5+
6+
<!-- markdownlint-disable MD033 MD041 -->
7+
8+
<img
9+
align="right"
10+
alt="Logo of the Shokunin Static Site Generator"
11+
height="261"
12+
src="https://kura.pro/shokunin/images/logos/shokunin.svg"
13+
title="Logo of the Shokunin Static Site Generator"
14+
width="261"
15+
/>
16+
17+
<!-- markdownlint-enable MD033 MD041 -->
18+
19+
*Part of the [Mini Functions][0] family of Rust libraries.*
20+
21+
## Example sites
22+
23+
Shokunin empowers building fast, customizable sites through flexible templating.
24+
25+
The table below showcases diverse websites built with Shokunin, demonstrating
26+
its versatility for:
27+
28+
- Blogs and project documentation
29+
- Company websites and personal portfolios
30+
- Even advanced functionalities like dashboards and custom browsing systems.
31+
32+
Get inspired by these examples and explore the potential of Shokunin for your
33+
next project. Each site leverages Shokunin's ability to process metadata and
34+
generate optimized static assets.
35+
36+
Browse the source code for a deeper dive into
37+
their implementations.
38+
39+
| # | Website | Source Code|
40+
|:---|:---|:---:|
41+
| 01 | [https://akande.co/][00] | [Àkàndé Voice Assistant Website][A] |
42+
| 02 | [https://audioanalyser.co/][01] | [Audio Analyser Website][B] |
43+
| 03 | [https://bankingonquantum.com/][02] | [Banking on Quantum Website][C] |
44+
| 04 | [https://bankstatementparser.com/][03] | [Bank Statement Parser Website][D] |
45+
| 05 | [https://dttlib.com/][04] | [DttLib Website][E] |
46+
| 06 | [https://hshlib.one/][05] | [HshLib Website][F] |
47+
| 07 | [https://kaishi.one/][06] | [Kaishi Website][G] |
48+
| 08 | [https://kyberlib.com/][07] | [KyberLib Website][H] |
49+
| 09 | [https://l90s.com/][08] | [L90s Website][I] |
50+
| 10 | [https://pain001.com/][09] | [Pain001 Website][J] |
51+
| 11 | [https://sebastienrousseau.com/][10] | [Sébastien Rousseau Website][K] |
52+
| 12 | [https://shokunin.one/][11] | [Shokunin Website][L] |
53+
54+
55+
[0]: https://minifunctions.com/ "The Rust Mini Functions"
56+
57+
[00]: https://akande.co/
58+
[01]: https://audioanalyser.co/
59+
[02]: https://bankingonquantum.com/
60+
[03]: https://bankstatementparser.com/
61+
[04]: https://dttlib.com/
62+
[05]: https://hshlib.one/
63+
[06]: https://kaishi.one/
64+
[07]: https://kyberlib.com/
65+
[08]: https://l90s.com/
66+
[09]: https://pain001.com/
67+
[10]: https://sebastienrousseau.com/
68+
[11]: https://shokunin.one/
69+
70+
[A]: https://github.com/sebastienrousseau/akande.github.io "Source Code for the Website of Àkàndé Voice Assistant"
71+
[B]: https://github.com/sebastienrousseau/audioanalyser.github.io "Source Code for the Website of Audio Analyser"
72+
[C]: https://github.com/sebastienrousseau/bankingonquantum.github.io "Source Code for the Website of Banking on Quantum"
73+
[D]: https://github.com/sebastienrousseau/bankstatementparser.github.io "Source Code for the Website of Bank Statement Parser"
74+
[E]: https://github.com/sebastienrousseau/dttlib.github.io "Source Code for the Website of DttLib"
75+
[F]: https://github.com/sebastienrousseau/hshlib.github.io "Source Code for the Website of HshLib"
76+
[G]: https://github.com/sebastienrousseau/kaishi.github.io "Source Code for the Website of Kaishi"
77+
[H]: https://github.com/sebastienrousseau/kyberlib.github.io "Source Code for the Website of KyberLib"
78+
[I]: https://github.com/sebastienrousseau/l90s.github.io "Source Code for the Website of L90s"
79+
[J]: https://github.com/sebastienrousseau/pain001.github.io "Source Code for the Website of Pain001"
80+
[K]: https://github.com/sebastienrousseau/sebastienrousseau.github.io "Source Code for the Website of Sébastien Rousseau"
81+
[L]: https://github.com/sebastienrousseau/shokunin.github.io "Source Code for the Website of Shokunin"

README.md

+33-25
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,25 @@ templates to help you create high quality websites with ease.
5757
Shokunin Static Site Generator (SSG) feature highlights include:
5858

5959
- Blazing fast and flexible static site generator written in Rust
60-
- Built-in support for [GitHub Flavoured Markdown][12] (GFM).
61-
- Built-in support for Google Analytics and Bing Analytics.
62-
- Compatible with various HTML themes and Premium templates.
63-
- Generates Atom and RSS feeds for your blog posts.
64-
- Generates minified versions for optimal performance and SEO.
65-
- Includes a built-in Rust development server for local development and testing.
66-
- Supports multiple content formats, including Markdown, YAML, JSON, TOML, XML,
67-
etc.
68-
- Built-in support for sitemap generation, robots.txt generation, canonical
69-
name (CNAME) records and custom 404 pages.
60+
- Built-in support for [GitHub Flavoured Markdown][12] (GFM)
61+
- Built-in support for Google Analytics and Bing Analytics
62+
- Experimental support for PDF generation
63+
- Compatible with various HTML themes and premium templates
64+
- Generates Atom and RSS feeds for your blog posts automatically
65+
- Generates minified HTML for optimal performance and SEO
66+
- Includes a built-in Rust development server for local testing
67+
- Supports multiple content formats:
68+
- Markdown
69+
- YAML
70+
- JSON
71+
- TOML
72+
- XML
73+
- Built-in generation for:
74+
- Sitemaps
75+
- robots.txt
76+
- Canonical name (CNAME) records
77+
- Custom 404 pages
78+
- Comprehensive documentation
7079

7180
## Table of Contents
7281

@@ -142,10 +151,7 @@ You can find our documentation on [docs.rs][9], [lib.rs][10] and [crates.io][8].
142151
### Command Line Interface (CLI)
143152

144153
The Shokunin Static Site Generator (SSG) library runs in a Terminal window and
145-
can be used to generate a static website.
146-
147-
Here’s the first command you can enter in your Terminal window to run Shokunin
148-
Static Site Generator (SSG):
154+
can be used to easily generate a static website. To get started, run:
149155

150156
```shell
151157
ssg --new=docs --content=content --template=template --output=output --serve=public
@@ -157,21 +163,24 @@ or
157163
ssg -n=docs -c=content -t=template -o=output -s=public
158164
```
159165

160-
This command will create a new website with the name `docs` in the current
161-
directory. It will use the `content` directory to gather the website content
162-
and the `template` directory to generate the website files. It will serve the
163-
website directly from the `mysite` directory.
166+
This creates a new website in a directory called `docs` using the markdown content from the `content` directory and the HTML templates from the `template` directory. The static and compiled HTML files and artefacts are then generated in a `docs` folder.
167+
168+
Shokunin is ideal for hosting your site on GitHub Pages. Simply commit and push the `docs` folder to your main branch, and set the GitHub Pages publishing source to point to that folder.
169+
170+
During development, you can use the `--serve` or `--s` option to start a local development server to preview content changes.
171+
172+
With Shokunin's GFM and theme support, you can focus on writing markdown content while the SSG handles delivering a fast, SEO-friendly site.
164173

165174
#### Arguments
166175

167-
- `-n`, `--new`: The name of the new website. (required)
168-
- `-c`, `--content`: The directory containing the website content. (required)
169-
- `-t`, `--template`: The directory containing the website templates.
176+
- `-n`, `--new`: The name of the folder for your new website. (required)
177+
- `-c`, `--content`: The directory containing the website markdown content. (required)
178+
- `-t`, `--template`: The directory containing the HTML website templates.
170179
(required)
171180
- `-o`, `--output`: The directory where the generated website files will be
172181
saved temporarily. (required)
173182
- `-s`, `--serve`: Run the development server. (optional). The directory from
174-
which the website will be served.
183+
which the website will be served. (optional)
175184

176185
### In your project
177186

@@ -180,7 +189,7 @@ following to your `Cargo.toml` file:
180189

181190
```toml
182191
[dependencies]
183-
shokunin = "0.0.25"
192+
shokunin = "0.0.26"
184193
```
185194

186195
Add the following to your `main.rs` file:
@@ -290,14 +299,13 @@ of useful suggestions on how to improve this project.
290299
[14]: https://www.rust-lang.org/learn/get-started "Rust"
291300
[15]: https://codecov.io/github/sebastienrousseau/shokunin?branch=main "Codecov"
292301
[16]: https://www.rust-lang.org/policies/code-of-conduct "Rust's Code of Conduct"
293-
[17]: https://forge.rust-lang.org/release/platform-support.html "Rust Platform Support"
294302

295303
[banner]: https://kura.pro/shokunin/images/titles/title-shokunin.svg "Banner of the Shokunin Static Site Generator"
296304
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/shokunin?style=for-the-badge&token=wAcpid8YEt 'Codecov'
297305

298306
[crates-badge]: https://img.shields.io/crates/v/ssg.svg?style=for-the-badge 'Crates.io badge'
299307
[divider]: https://kura.pro/common/images/elements/divider.svg "divider"
300308
[docs-badge]: https://img.shields.io/docsrs/ssg.svg?style=for-the-badge 'Docs.rs badge'
301-
[libs-badge]: https://img.shields.io/badge/lib.rs-v0.0.25-orange.svg?style=for-the-badge 'Lib.rs badge'
309+
[libs-badge]: https://img.shields.io/badge/lib.rs-v0.0.26-orange.svg?style=for-the-badge 'Lib.rs badge'
302310
[license-badge]: https://img.shields.io/crates/l/ssg.svg?style=for-the-badge 'License badge'
303311
[made-with-rust-badge]: https://img.shields.io/badge/rust-f04041?style=for-the-badge&labelColor=c0282d&logo=rust 'Made With Rust badge'

TEMPLATE.md

+21-57
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,13 @@
1010

1111
<!-- markdownlint-enable MD033 MD041 -->
1212

13-
# Shokunin Static Site Generator (SSG) v0.0.25 🦀
13+
# Shokunin Static Site Generator (SSG) v0.0.26 🦀
1414

1515
The fastest Rust-based Static Site Generator (SSG) for building professional
1616
websites and blogs.
1717

1818
*Part of the [Mini Functions][0] family of Rust libraries.*
1919

20-
<!-- markdownlint-disable MD033 MD041 -->
21-
<center>
22-
<!-- markdownlint-enable MD033 MD041 -->
23-
24-
![Banner of the Shokunin Static Site Generator][banner]
25-
26-
[![Made With Rust][made-with-rust-badge]][14]
27-
[![Crates.io][crates-badge]][8]
28-
[![Lib.rs][libs-badge]][10]
29-
[![Docs.rs][docs-badge]][9]
30-
[![License][license-badge]][3]
31-
[![Codecov][codecov-badge]][15]
32-
33-
[Website][1]
34-
[Documentation][9]
35-
[Report Bug][4]
36-
[Request Feature][4]
37-
[Contributing Guidelines][5]
38-
39-
<!-- markdownlint-disable MD033 MD041 -->
40-
</center>
41-
<!-- markdownlint-enable MD033 MD041 -->
42-
43-
![divider][divider]
44-
4520
## Overview
4621

4722
Shokunin is a lightning-fast static site generator (SSG) that is optimised for
@@ -56,38 +31,27 @@ templates to help you create high quality websites with ease.
5631
Shokunin Static Site Generator (SSG) feature highlights include:
5732

5833
- Blazing fast and flexible static site generator written in Rust
59-
- Built-in support for [GitHub Flavoured Markdown][12] (GFM).
60-
- Built-in support for Google Analytics and Bing Analytics.
61-
- Compatible with various HTML themes and Premium templates.
62-
- Generates Atom and RSS feeds for your blog posts.
63-
- Generates minified versions for optimal performance and SEO.
64-
- Includes a built-in Rust development server for local development and
65-
testing.
66-
- Supports multiple content formats, including Markdown, YAML, JSON, TOML, XML,
67-
etc.
68-
- Built-in support for sitemap generation, robots.txt generation, canonical
69-
name (CNAME) records and custom 404 pages.
34+
- Built-in support for [GitHub Flavoured Markdown][01] (GFM)
35+
- Built-in support for Google Analytics and Bing Analytics
36+
- Experimental support for PDF generation
37+
- Compatible with various HTML themes and premium templates
38+
- Generates Atom and RSS feeds for your blog posts automatically
39+
- Generates minified HTML for optimal performance and SEO
40+
- Includes a built-in Rust development server for local testing
41+
- Supports multiple content formats:
42+
- Markdown
43+
- YAML
44+
- JSON
45+
- TOML
46+
- XML
47+
- Built-in generation for:
48+
- Sitemaps
49+
- robots.txt
50+
- Canonical name (CNAME) records
51+
- Custom 404 pages
52+
- Comprehensive documentation
7053

7154
[0]: https://minifunctions.com/ "The Rust Mini Functions"
72-
[1]: https://shokunin.one "Shokunin Static Site Generator"
73-
[3]: http://opensource.org/licenses/MIT "MIT license"
74-
[4]: https://github.com/sebastienrousseau/shokunin/issues "Issues"
75-
[5]: https://github.com/sebastienrousseau/shokunin/blob/main/CONTRIBUTING.md "Contributing"
76-
[8]: https://crates.io/crates/ssg "Crate.io"
77-
[9]: https://docs.rs/crate/ssg/ "Docs.rs"
78-
[10]: https://lib.rs/crates/ssg "Lib.rs"
79-
[12]: https://github.github.com/gfm/ "GitHub Flavoured Markdown"
80-
[14]: https://www.rust-lang.org/learn/get-started "Rust"
81-
[15]: https://codecov.io/github/sebastienrousseau/shokunin?branch=main "Codecov"
82-
83-
[banner]: https://kura.pro/shokunin/images/titles/title-shokunin.svg "Banner of the Shokunin Static Site Generator"
84-
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/shokunin?style=for-the-badge&token=wAcpid8YEt 'Codecov'
85-
86-
[crates-badge]: https://img.shields.io/crates/v/ssg.svg?style=for-the-badge 'Crates.io badge'
87-
[divider]: https://kura.pro/common/images/elements/divider.svg "divider"
88-
[docs-badge]: https://img.shields.io/docsrs/ssg.svg?style=for-the-badge 'Docs.rs badge'
89-
[libs-badge]: https://img.shields.io/badge/lib.rs-v0.0.25-orange.svg?style=for-the-badge 'Lib.rs badge'
90-
[license-badge]: https://img.shields.io/crates/l/ssg.svg?style=for-the-badge 'License badge'
91-
[made-with-rust-badge]: https://img.shields.io/badge/rust-f04041?style=for-the-badge&labelColor=c0282d&logo=rust 'Made With Rust badge'
55+
[01]: https://github.github.com/gfm/ "GitHub Flavoured Markdown"
9256

9357
## Changelog 📚

content/404.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no"
4949
atom_link: "https://kaishi.one/404/rss.xml"
5050
category: "Technology"
5151
docs: "https://validator.w3.org/feed/docs/rss2.html"
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: "The page may have been removed or renamed. Please visit our homepage for more information."
5454
item_guid: "https://kaishi.one/404/rss.xml"
5555
item_link: "https://kaishi.one/404/rss.xml"

content/contact.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
5050
atom_link: https://kaishi.one/contact/rss.xml
5151
category: "Technology"
5252
docs: https://validator.w3.org/feed/docs/rss2.html
53-
generator: "Shokunin SSG (version 0.0.25)"
53+
generator: "Shokunin SSG (version 0.0.26)"
5454
item_description: RSS feed for the contact page of the Kaishi website.
5555
item_guid: https://kaishi.one/contact/rss.xml
5656
item_link: https://kaishi.one/contact/rss.xml

content/features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/offline.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/post.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/privacy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/tags.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

content/terms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewpor
4949
atom_link: https://kaishi.one/rss.xml
5050
category: "Technology"
5151
docs: https://validator.w3.org/feed/docs/rss2.html
52-
generator: "Shokunin SSG (version 0.0.25)"
52+
generator: "Shokunin SSG (version 0.0.26)"
5353
item_description: RSS feed for the site
5454
item_guid: https://kaishi.one/rss.xml
5555
item_link: https://kaishi.one/rss.xml

0 commit comments

Comments
 (0)