statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.65k stars 235 forks source link

Support for multi-page blog posts #838

Open johanvergeer opened 5 years ago

johanvergeer commented 5 years ago

What I think would be really cool is to have a way to create multi-page blog posts. This could be used when you want to create a tutorial that consists of multiple parts, or just a long blog post you want to separate over a couple of pages.

I realise this can be done by just writing a couple of .md files in the posts directory, but I would like to take this up a notch. How about automatically generating a toc on the first page. Or automatically generate prev and next buttons on each page for the post.

Does anyone else feel like this could be valuable?

daveaglick commented 5 years ago

I like this idea - could probably use the same mechanism as blog “series” in #512 (the two are basically the same thing, only difference I can see is a “series” would be published over time whereas a “multi-page” post would be published together).

johanvergeer commented 5 years ago

The idea is indeed the same.

What I'm thinking about is to use one or more Partials that can be overwritten by theme authors. These partials are used when a post is marked to be a series.

The first partial I can think of would contain the next and prev buttons, and the second one would contain the table of contents (toc) for the series. I think the author should be able to decide whether the toc should be displayed on the first page or on each page.

Is it possible to let the writer of the website know when he is using the series functionality, but the Partials are not implemented in the theme when building the site? Maybe send a link to a page on the Wyam site with some directions on how to implement the Partials?