Repository navigation
Add Tutorial Sync Script and GitHub Actions workflow - #990
Conversation
|
For clarification regarding #979 (comment) I think this file is pretty much unmaintainable unless there is a way to generate it. And by this I mean generate entirely. That said, the real issue is that this file is gigantic. Regarding the technical side, I suggest generating a Python dict with all the info and then using |
|
I like the idea of one file per repository. For the tutorials, I see that it is mostly duplication, so that should be easy to generate: each However, I don't see the reason for completely auto-generating the file. There are aspects here that need human input: for example, that There are also pages that are inconsistent across repositories, and I would expect that more could appear at times if we integrate more contributed repositories. For example:
are all meant to be mounted to some To me, such a long file is not an issue, as long as it is clear how to update it. Things could be further automated and made consistent (and I am happy to come up with conventions and apply them), but I would not wait for that before we can merge the rest. |
|
I checked the Hugo configuration behavior and documentation, but unfortunately splitting this across multiple files isn't supported natively. In Hugo's configuration directory, filenames in The only workaround would be keeping separate files per repository and writing a custom script to stitch/concatenate them into |
This is really unfortunate. Then I suggest the following:
|
Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
Add
sync_tutorialsscript and workflowUpdates the tutorials in
module.tomlby using a temporary directory to shallow-cloneprecice/tutorials, discovers all tutorial cases and their image folders, and updates the Hugo mounts alphabetically. The workflow then opens an automated PR when changes are detected.Testing:
Reference #979 (comment)