Relearn theme: include a Reveal slide per topic

Hello,

my goal ist to create a page with workshop material.
Let’s say level four as in the example in the Page Organisation is the layer where the actual lessons are (page-4-a.md for example is a single lession).

Then I want to have another file page-4-a-slides.md which

  1. uses Reveal-Hugo as template
  2. is accessible from the lesson page, but not visible in the navigation.

My goal is that each lesson page contains reading material for the students, and this page also contains a link to the according slides. The lesson slides should not have their own link in the navigation menu.

For that, I found the documentation topic Tutorial: Add a Reveal.js presentation to an existing Hugo site.

The slides are rendering when I have a separate “slides” folder inside the lesson:
CleanShot 2024-05-02 at 02.02.24
But in the Relearn theme menu I see the slides now as a sub-topic below the session - I get the slides rendered, but this representation/linking is not what I want…
CleanShot 2024-05-02 at 02.04.04


They are not rendering when slides.md is side by side to the _index files.
CleanShot 2024-05-02 at 02.05.35
In that case, I also get an unwanted subtopic in the menu…
CleanShot 2024-05-02 at 02.06.39
and the link does not work (http://localhost:1313/basics/configuration/slides.html does not get created at all).

(Output format as documented here is already set )


Correct me please, but in order to have shared page resources for both the slides and the docs (when I change an image in the docs, it should also update in the slides), I guess I would have to create a leaf bundle (with index.md) for each lesson. But for Relearn I need branch bundles (_index.md) instead of leafs.:face_with_diagonal_mouth: :man_shrugging:

Can you help me understanding my error?
Thanks a lot! Regards,
Simon

P.S.: Both themes are installed and activated:
theme = ["relearn", "reveal"]

Add

[_build]
  render = "always"
  list = "never"
  publishResources = true

to the front matter of your slide pages. This works regardless of the page type (branch bundle, leaf bundle, page).

If this doesn’t work for you, let us see your code

And btw: Don’t use the exampleSite of the theme for your own project. Follow the installation instructions (which are common for all themes - not just Relearn)

Hello,
unfortunately, adding the front matter has not yet worked as expected. :expressionless:

Thanks for the hint to the exampleSite - I just wanted to try the problem in a fully configured site (with the same little success…).
But of course you’re right, Sören - a problem should be substantiated with minimal example code.

I have now done that and uploaded the hugo project here.

The page of lesson1 explains what I did and again the problem.
CleanShot 2024-05-02 at 21.12.15

I would be very happy if you could help me to solve my problem!

Many thanks in advance!
Simon

Hi Simon. I have it working but it’s not that nice at the moment…

With a pure Markdown link, this can’t be achieved (at the moment - although I could think of some trickery using query parameter for this).

Another idea would be to create the link by a shortcode like:

{{% slides %}}

which would print the whole HTML anchor element. This would only work if there are at most one set of slides per page.

Another question is: do you care about the slides URL or don’t you mind?

Let’s continue the discussion in link: support link variations through query parameter · Issue #850 · McShelby/hugo-theme-relearn · GitHub

1 Like