dark-flames / apollo-typst

Typst blog template based on Zola, typst.ts, and apollo.
Apache License 2.0
24 stars 1 forks source link

Use node compiler instead of typst-ts-cli #1

Closed Myriad-Dreamin closed 2 weeks ago

Myriad-Dreamin commented 1 month ago

Like that hexo-renderer-typst/lib/compiler.cjs, as well as Documentation.

const { NodeCompiler, DynLayoutCompiler } = require('@myriaddreamin/typst-ts-node-compiler');
const regularCompiler = NodeCompiler.create();
const dynLayout = DynLayoutCompiler.fromBoxed(regularCompiler.intoBoxed());
return dynLayout.vector({ mainFilePath });;
dark-flames commented 1 month ago

I'm currently working on a new CLI entry instead of the typst-ts-cli, as I noticed that the --input argument becomes invalid when compiling to a dynamic layout.

Myriad-Dreamin commented 1 month ago

I managed to make it work in my fork, https://github.com/Myriad-Dreamin/apollo-typst.

dark-flames commented 1 month ago

I'm considering developing a new CLI entry in Rust to provide more flexible functionality. It will become a fully-featured static site generator based on Zola, and will support various content types, not just Markdown and Typst. This work might take some time.

dark-flames commented 2 weeks ago

I managed to make it work in my fork, https://github.com/Myriad-Dreamin/apollo-typst.

I have cherry-picked commits from your repository. Thank you for your contributions.

Myriad-Dreamin commented 1 week ago

I guess this is not needed anymore.

https://github.com/dark-flames/apollo-typst/blob/a1db06f99f7d907eb8740c6f5c9a5e33b41be71f/README.md?plain=1#L16