djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.25k stars 213 forks source link

Publish all crate versions books #1030

Open GuillaumeGomez opened 2 months ago

GuillaumeGomez commented 2 months ago

Currently, only the main branch book version is published online, which is very confusing if you're using this version (which I assume is the most common case...).

Instead, why not hosting all this crate's versions? We could rely on the default github renderer to list sub-folders (for example 0.12.1, 0.12.0, main, etc) and have the book hosted under each folder.

What do you think?

Kijewski commented 2 months ago

I would love that!

djc commented 2 months ago

I like the user-facing outcome but I'm wary of having n copies of the book in tree. Can we do this in some kind of build process/workflow step?

Kijewski commented 2 months ago

If you're OK with having one small ad in the book, then using readthedocs.org would most likely the simplest solution. It uses github hooks to automagically update the current version when it's updated.

Usage example: https://github.com/readthedocs-examples/example-mkdocs-basic/

djc commented 2 months ago

That sounds like moving away from mdBook? I'd rather stick with mdBook.

Kijewski commented 2 months ago

https://github.com/Kijewski/test-askama-rtd/commit/f570530c59cd560f996119e90a0bd3d558d9d696https://test-askama-rtd.readthedocs.io/en/latest/

GuillaumeGomez commented 2 months ago

I'm not a big fan of the ad but not my project so let's see what @djc prefers. ;)

djc commented 2 months ago

By "ad" do you mean the "ReadTheDocs" floating widget in the lower right corner? Or do you mean some other add that would happen later in the pipeline after publishing to RTD? Your proposed change looks okay to me.