Page - asset - confusion

hi there.
i’m new to zola and a bit confused after some experimenting.
[zola 0.9.0]


the problem:

i want to publish the slides of my course for my studets.
simple task: on every site you have some words/ media and a next-link

now i thought i create a section with a page per slide:

|---talk_1/
|   |---slide1.md
|   |---slide2.md
|   |--- ... 
|
|---static/talk_1/
|   |---doorbell.jpg
|   |---xenakis.mp3

when building i get a problem with the (relative links) assets for each slide

---talk_1/
   |---slide1/
       |---index.html
   |---slide2/
       |---index.html
   |--- ... 
   |---doorbell.jpg
   |---xenakis.mp3

because the html suggest that the files would be within the slideX folder.
/talk_1/slide24/xenakis.mp3

i wrote a short code for the media embeds. for example:

/template/audio.html:

<img alt="{{alt}}" src='{{src}}'>

in the slide.md file i say:

{{ image(src="./doorbell.jpg" alt="doorbell") }}

the next link also doesn’t work with this setup.
in each .md page i define a

[extra]
n = <next slide>

in the template the link is created:

{% if page.extra.n %}
<div class="next">
  <a href="./slide{{ page.extra.n }}"></a>
</div>
{% endif %}

here i have the same problem that the rendered link looks like:

<a href="/slide1/slide2/index.html">next</a>

this works fine with zola serve but the build doesn’t work…
is this a bug or a feature?


assumption: wrong approach?

although i would expect zola to ‘correct’ the links i’ve been looking into the pagination thing because it seemed to be actually what i want but the documentation is not explicit enough for me.

Two things can get paginated: a section and a taxonomy term.

how do i paginate a section?
the documentation only tells me what happens if a section already is paginated:

A paginated section gets the same section variable as a normal section page minus its pages. The pages are instead in paginator.pages

(the classic problem of teaching/knowledge transfer: it’s hard to forget what one already knows.)

To enable pagination, you have to follow: https://www.getzola.org/documentation/content/section/#pagination
Once it’s setup, each page will automatically have earlier/later (if they are sorted by date) or lighter/heavier (if they are sorted by weight) which can be used like so https://github.com/getzola/zola/blob/master/test_site/templates/page.html#L8-L9

Considering that’s the second post asking for that just today, it should probably have its own section in the docs to stand out.

thanks for your reply!
just to be explicit:
in the section file ‘_index.md’ in the /talk_1/ folder

|---talk_1/
|   |---_index.md
|   |---slide1.md
|   |---slide2.md
|   |--- ... 

i would write

+++
paginate_by = 1
paginate_path = slide
+++

and the section talk_1 would be paginated?

still the question remains:
wouldn’t this rather be a ‘hack’ considering the implicit idea of the common use of a paginator?
would there be a better approach to my problem?
thanks!