Settings

Theme

Show HN: Maudit, a Rust library to build static websites

maudit.org

4 points by Princesseuh 2 months ago · 4 comments · 1 min read

Reader

Hello!

Maudit is a library (not a framework) to build static websites. What this means is that a Maudit website is a normal Rust project, pages are normal Rust structs and so on.

There's a built-in function one can use that will do pages -> HTML as expected, or one can run quite literally `SomePage.build()` to build a single page.

While there are some obvious downsides in complexity on the user side, I'm hoping that this model allows people to grow past some of the limitations that traditional SSG frameworks have, where it can be hard sometimes to customise certain aspects.

It's still super early, but feedback is extremely welcome. Hope you'll like it!

sureglymop 2 months ago

This is a really cool idea, thanks for sharing it! Will check it out and try it out over the weekend.

One question before I dive in: If one wants to create a blog, how much is already provided by Maudit to make generating RSS feed easier? Or would I have to hand roll that part?

  • PrincesseuhOP 2 months ago

    Ah! Thank you for taking interest.

    At this time there's no built-in way to generate RSS feeds, you'd need to use a "Endpoint" route and return a .xml from it: https://maudit.org/docs/routing/#endpoints.

    It's pretty straightforward, but it does require some manual work. Crates like `rss_gen` can help making the generation easier, though

    • sureglymop 2 months ago

      Tried it out today. I really want to give you props for making it a library and not a framework. And also for including benchmarks in the repo. Good stuff.

      Will try generating a feed when I get the chance/more time, thanks for the crate suggestion.

      • PrincesseuhOP 2 months ago

        Thank you! Let me know if you have any questions or encounter any problems, always happy to help.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection