chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

A "build this?" flag for items in the config's structure #197

Closed christianp closed 9 months ago

christianp commented 9 months ago

For things like homework solutions, it'd be nice to be able to prepare them in advance, but not include them in the output until they're supposed to be available.

prowlett commented 9 months ago

I would use this! I often have exercise solutions or a post-class version of the slides to replace the pre-class spoiler-free version, or indeed upcoming weeks that I have got ready but am not ready to release to students yet. I comment these out in config.yml, which is fairly straightforward via a keyboard shortcut but I guess a flag would be better.

christianp commented 9 months ago

There was already the property is_hidden, but it wasn't implemented properly in the command-line tool - I think the old LTI tool might have used it to control access to built pages.

I've changed the template of the structure pages so they don't show hidden items, and added a hash to the URLs of hidden items so they can't be guessed by students, while maintaining consistent URLs so you can link to them.