An experimental static site generator based on build.rs.
Aoike is highly customizable, with simple configuration. Check the examples in example/ for more details.
aoike crate provides the core data structures and the basic parsing and codegen logic.
aoike-dioxus and aoike-sycamore are the implementations of AoikeApp for Dioxus and Sycamore respectively.It is recommended to use aoike-sycamore instead of aoike-dioxus.
The whole philosophy is "the site can be abstracted into pure data structures", so you can use any framework you want to build your site.
And the whole process can be divided into two phases:
-
The build phase: This normally happends in the
build.rs, we:- Read index content from
doc-src/index.mdfile. - Read blog files from
doc-src/postsdirectory. - Use git cli to get create and update time of each file.
- Parse markdown to html with
pulldown-cmark. - Assemble the
Postdata, and generate adocsgen.rsfile containing the data defination.
- Read index content from
-
The runtime phase: This depends on the framework you use, for example, in Dioxus, you can use
aoike-dioxus::AoikeAppto launch an app, and in Sycamore, you can useaoike-sycamore::AoikeAppto launch an app.
With this two phases, there are infinite possibilities:
- You can use
pulldown-cmarkto parse markdown files to html, and convert html to rsx. (just like the example) - You can use
typstto compile typst files to html, and convert html to rsx. - You can write a scraper to retrive data from internet and build rsx for a statistic app.
- You can access your filesystem of assets (like videos and images), and generate a static site to show them.
- You can encrypt your html source, and implement decrypt method for it with a password input in the app.
- ...