GithubHelp home page GithubHelp logo

Comments (9)

Keats avatar Keats commented on August 15, 2024 1

Once we have tera2 it should be possible to revamp all the functions to get the paginator but it's far away

from zola.

Keats avatar Keats commented on August 15, 2024 1

Even if adding the entire paginator seems not possible, do you think it would be possible to just add paginate_by and paginate_reversed in the serialized section returned by get_section

That would be fine yes

from zola.

Keats avatar Keats commented on August 15, 2024

get_url doesn't check whether the path exists as some stuff gets added during the build process.

from zola.

charlesrocket avatar charlesrocket commented on August 15, 2024

@Keats oh snap, that was my last idea. There are still sitemaps, but I have a grim feeling. All the work on the dynamic PWA cache just got cancelled because there's nowhere to pull pager permalinks from.

from zola.

charlesrocket avatar charlesrocket commented on August 15, 2024

@Keats what about something like validate_permalink() since Tera 2 is not happening any time soon?

from zola.

charlesrocket avatar charlesrocket commented on August 15, 2024

While there is no built-in solution, one could manually extract pagination settings and calculate required page numbers: charlesrocket/halve-z/pull/27

from zola.

ZzMzaw avatar ZzMzaw commented on August 15, 2024

Hello,

In order to set up a 'series' feature in a theme, I would need to know if pagination is reversed or not so that I can align series' pages indexes accordingly.
Everything works well in the series itself (which is a section) has I have both section and paginator variables.
Nevertheless, in the series' pages, I can just do a get_section to retrieve the series' section information and I don't have any way to retrieve pagination information.
Unfortunately, applying the workaround just above would not work in my case because my series' section has some content (and not only frontmatter).

Reversing the order of the pages listed in the section when paginate_reversed (or maybe something more meaningful such as sort_reversed) is set to true would work as well for me but I would expect it to have such a huge impact that it doesn't worth it in my opinion.

Even if adding the entire paginator seems not possible, do you think it would be possible to just add paginate_by and paginate_reversed in the serialized section returned by get_section?

Self {
relative_path: &section.file.relative,
colocated_path: &section.file.colocated_path,
ancestors: &section.ancestors,
draft: section.meta.draft,
content: &section.content,
permalink: &section.permalink,
title: &section.meta.title,
description: &section.meta.description,
extra: &section.meta.extra,
path: &section.path,
components: &section.components,
toc: &section.toc,
word_count: section.word_count,
reading_time: section.reading_time,
assets: &section.serialized_assets,
lang: &section.lang,
generate_feeds: section.meta.generate_feeds,
transparent: section.meta.transparent,
pages,
subsections,
translations,
backlinks,
}

If yes, I can try to tackle it and propose a PR in the weeks to come.
If you would prefer me to open a new issue instead of reusing this one, please tell me.

Thanks for your help and support.

from zola.

ZzMzaw avatar ZzMzaw commented on August 15, 2024

That would be fine yes

Thanks for your feedback.

This is my first contribution and I was not able to figure out which branch I should push this modification to (master or next).
Is master dedicated to bug fixing the current version only or should we consider this small evolution to be part of it as well?

Thanks in advance for your help and support.

from zola.

Keats avatar Keats commented on August 15, 2024

master is only for docs update, all new features/bug fixes go on the next branch

from zola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.