markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
45 stars 12 forks source link

changed template config handling #20

Closed gmabey closed 8 months ago

gmabey commented 8 months ago

I see that the template directive is not exhibited in the sample sabledocs.toml. I'm guessing that's because you haven't finalized how that would work.

I needed to use some different template files, and I ended up making this minor change.

The default template directory _default/ now appears fewer times in the code, and if template is specified in the config file, it is no longer required to be a subdirectory of the current working directory (but it still could be).

markvincze commented 8 months ago

Hey @gmabey,

Thanks for the submission, I like the idea that this way the config is more flexible as we can use any folder with either a full or a relative path.

But this is a breaking change, which would break any user currently using the template config field.

So I adjusted this keeping your commit here: https://github.com/markvincze/sabledocs/pull/23, this way we have a new template_path field, which works the way you proposed it, but still keep the old template field to not break existing users. And a Warning messages is printed if someone is using template, so that we can remove the field completely in a future release. Can you check that PR?

markvincze commented 8 months ago

Addressed in #23