Comments (6)
Now that we have a _index.md
for sections we could use its front matter to setup pagination but that doesn't really work in the case of a simple blog with only posts.
We could have a default pagination setting in config.toml
for that case but it feels like having the behaviour in 2 places.
The sensible way (it seems) is to:
- have a default for pagination in
config.toml
: defaults to no pagination but can be set up to paginate by settingnum_per_page
,pagination_path
andpaginate
. This will apply to the index only. - Sections have to enable paginations and can override
num_per_page
andpath_name
in their frontmatter, no pagination will be created implicitely.
pagination_path
is the path to be used in the URL, it could be page
by default. It would like mysite.com/page/2 etc in that case.
That should cover 99% of the cases
from zola.
We could also have a _index.md
for the actual index page instead of putting the default in the config but I'm not sure it's worth it.
In practice, in a mixed content site (landing page + blog for example), the index page will not be the one paginated. I can't think of an example where it would be the case: paginating different kind of content doesn't really make sense.
from zola.
No clue on how to handle pagination for the index page: what do you do if you have a couple of static pages + posts? Having your about page in the pagination doesn't make sense.
I'll only paginate sections for now and we can figure out the index section later (maybe only paginate pages that have a date or a weight?)
from zola.
See #34 for basic implementation, doesn't paginate index page yet
from zola.
Will be easier after #14 to generalise I think and with the _index.md
for the index page
from zola.
#55 should do the trick
from zola.
Related Issues (20)
- Feature request: tags for zola themes
- Hope provide Linux musl pre-builds , even if it's slow. HOT 4
- BibTeX: load_data fails on non-numeric values in the "month" field HOT 5
- Section that is nested under a page takes file path instead of URL path HOT 4
- Multilang index.md results in Error: We can't have a page called `index.md` in the same folder as an index section in HOT 3
- get_url returns url for wrong language HOT 2
- Stack overflow when blog count is too high HOT 10
- Feature request: build datetime HOT 4
- Add support for relative links (../content/page) to broken link checker HOT 9
- `zola serve`: option to store html files on disk. HOT 1
- "`feed_filename` for default language is specified twice" even though it's not HOT 4
- Allow loading front matter in templates HOT 6
- Add OPDS Support to Zola HOT 2
- Docker image for 0.18.0 is broken HOT 9
- Dark mode for docs? HOT 1
- Feature request: Add `hidden` property for frontmatter HOT 10
- how to create root pages HOT 1
- next/previous pages are in the wrong order HOT 1
- [Feature Request] Include page date in the search index HOT 1
- Theme translations HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zola.