Open robertodr opened 3 years ago
So the goal is that Sphinx infers the number from a path in a directive?
I was more thinking LaTeX-like where \section
keeps track of section numbering. So any .. challenge::
would render the box with a number on the side.
You suggestion is more advanced and would help keep the .. challenge::
in sync with changes in the underlying folder structure.
My philosophy here was "in a long-term view, we can't rely on numbers since the lesson will be continually updated", and I expected that people would keep referring to the lessons, for example watching a old video of it or referring to it with notes. So, I didn't place too high a priority on auto-numbering, since while convenient in the short term it makes problems when you want to change things. My recommendation is to use manual numbers, and where appropriate insert new numbers without changing all the numbers when it is convenient.
So... that's where this weird system of "5-Git Clone" came from. Manual numbers, which can be adjusted or you could add "5B" for example. Even if all the numbers change, by someone can look up exercise "Git Clone" and find what is hopefully it. (While interesting, I have a feeling this isn't really a working solution to the problem and no one would do it this way).
Maybe another option is each series of exercises has some numbers like 3A, 3B, 3C, so you can at least find the right area if not re-doing it.
What do you think? What's the best general option to recommend?
In my recent course I have used numbering and I think it can help to quickly locate the exercise.
For video recordings this can be a problem but maybe we can have both? An exercise can have a number and a name? The person in the live workshop appreciates the number because they need to find it and the breakout room closes again in 10 minutes. The person watching the video can pause it and locate the exercise by name and there the number is less important perhaps.
This is my usage scenario:
content/code/day-N
folder.day-N
folder has subfolders with one exercise each. The folder are prefixed with a number, for easier reference. The subfolder contains an incomplete scaffold and its solution. For example:Can there be automatic counters for the challenge boxes in the lesson? Such that it's easily discoverable into which folder to navigate when one is following along on the lesson webpage. I am not even sure this is possible in Sphinx, to be honest :sweat_smile: