Open Mazwak opened 2 years ago
As I’m also using zola, I would recommend their structure.
https://www.getzola.org/documentation/getting-started/directory-structure/
I appreciate your dive ❤️
includes
in book.ron
has to be added:
// files copied to `site` directory
includes: [
// `src/static/img` is copied to `site/static/img` on build
"static/img",
],
I changed it to not be commented out by default (#b7959b4). Also I need to write better doc!
Edit: Added // comment in the JSON
Regarding the structure, adbook
basically copies src/
to site/
, converting .adoc
files to .html
files. User can opt in other files in src/
with the includes
attribute. It has some explicity, but it lacks the free of user project structure.
So I'm considering to support symlinks [^1] in addition to the current just-copy model.
For example, if src/img
refers to static/images
, the latter directory is copied to site/img
.
[^1]: (Shortcuts on Windows?)
Or copy attribute in book.ron
might be better:
copy: [
("static", "site/static"),
]
I'll support it today or next weekend.
Ooh it looks like Zola's public/*
is mixin of content/*
and static/*
. Cool!
So I'm considering to add user-defined build actions like this..
build_actins: [
ConvertAsciiDocToSite("src/*"),
Copy("static/*", "site/"),
]
..so that user gets both full control and explicity.
That would be awesome. You could use submodules, and copy them.
It could be more generic for build.
build_actions : [
BuildAndCopy("asciidoctor", "src/*", "site/"),
BuildAndCopy("sass", "sass/*", "site/css/"),
Copy("static/fonts", "site/"),
Copy("submodudes/myawesometheme/img/*", "site/images/"),
With a select few backend, or have build commands.
build_commands : [
"asciidoctor" : "asciidoctor -r asciidoctor-diagram ...",
"sass" : "...",
]
However, it is much more work.
If I use a diagram, it does not work.
The diagram is created in 'src/static/img', but it is not moved/copied to 'site'.
It might be a bigger issue. It seems nothing is copied from static.
I also think that there should be 2 dirs :
and diagrams should go in a temp dir, like .adbook-cache.