Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an option in config.yaml for automated/non-automated episode numbering #623

Closed
anenadic opened this issue Nov 20, 2024 · 10 comments
Closed

Comments

@anenadic
Copy link

anenadic commented Nov 20, 2024

Automated episode numbering is not always suitable - it would be good to have a parameter to control this. E.g. see our lesson's episodes screenshot:

image

Because we have a set of episodes grouped in a 'non-standard' way (i.e. sections)- we'd ened our own numbersing scheme.

@froggleston
Copy link
Contributor

Hey @anenadic - I'm not sure how we'd implement this as we would not know how to handle non-standard episode structures by default in the Workbench. Do you have a link to the lesson so I could see how you have the structure laid out?

@anenadic
Copy link
Author

anenadic commented Nov 22, 2024

Hi @froggleston, we have a lesson that is split into 5 sections: https://carpentries-incubator.github.io/python-intermediate-development/.

When we translated it to the new Workbench format we got the episode list numbered as in the screenshot above. Without automated numbering, we could try to have:

  • Section 1 title
  • 1.1 episode title
  • 1.2 episdoe title
  • ...
  • Section 2 title
  • 2.1 episode title
  • ...

To indicate that episodes fall within sections.

I can see how this can be difficult and I am not familiar enough with the Workbench to offer a fix myself. Perhaps a parametrer "episode_numbering: false" in config.yml and then use episode titles only in the sidebar (and we control the numbering in the titles) - not sure how hard that would be?

@froggleston
Copy link
Contributor

froggleston commented Nov 22, 2024

Thank you for the info @anenadic! This isn't currently possible (and would not be a high priority for development currently given our capacity), but the quickest way to get something close to what you want is to number your episodes so they would represent your overall section, e.g. 01-foo.md, 02-bar.md, and within each of these your main h2 blocks would represent your internal "episodes", e.g. in 01-foo.md, ## 1.1 First episode.

Would that work for now?

@anenadic
Copy link
Author

Thank you for the info @anenadic! This isn't currently possible (and would not be a high priority for development currently given our capacity),
Totally get it.

but the quickest way to get something close to what you want is to number your episodes so they would represent your overall section, e.g. 01-foo.md, 02-bar.md, and within each of these your main h2 blocks would represent your internal "episodes", e.g. in 01-foo.md, ## 1.1 First episode.

Would that work for now?
So the actual episodes then just become "pages" that we link to, rather then show up in the sidebar navigation? And only "section" pages showing up in sidebar? Could do it like that. Our actual episodes (not section pages) are too long to be included within the section page so we would need separate pages for them.

It's not a biggie - we will do something to handle this. Thanks for looking into this @froggleston

@anenadic
Copy link
Author

This is what the sidebar navigation looks like now (the automated numbering mixed in with our internal numbering):

image

@froggleston
Copy link
Contributor

Ah OK - I think I see what might be feasible, i.e. removing the automatic addition of the list number elements! Let me see what I can come up with.

Do you have a link to this Workbench version of the lesson so I can test it as closely as possible to your lesson structure?

@anenadic
Copy link
Author

anenadic commented Nov 22, 2024

Here is the fork with the lesson translation: https://github.com/anenadic/python-intermediate-development-earth-sciences

Looking at the source code - this where I identified the sidebar is populated create_sidebar_item in https://github.com/carpentries/sandpaper/blob/main/R/utils-sidebar.R#L95 and this is where I stopped - but you know this already.

I think if we could prevent the 'position' variable being used to create items in the sidebar it might help but my R knowledge is 0.

@froggleston
Copy link
Contributor

That's really helpful, thanks @anenadic ! How does this look?

{CD0DB2F5-7002-4ED2-8186-062291556FD6}

@ErinBecker
Copy link
Contributor

Closed with #624

@anenadic
Copy link
Author

That's fantastic @froggleston - massive thanks! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants