Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todo: Incremental builds #37

Open
knadh opened this issue Dec 2, 2021 · 5 comments
Open

Todo: Incremental builds #37

knadh opened this issue Dec 2, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@knadh
Copy link
Owner

knadh commented Dec 2, 2021

For large groups, re-publishing and re-uploading every page isn't ideal. There should be a mechanism to build incrementally, maybe with an optional --incremental flag.

  1. The dynamic date index on the left sidebar is present in every single page. This should become a standalone page and be iframed in all other pages so that it can change independently without modifying older pages.
  2. What about pagination? As the month progresses, new page numbers appear at the bottom of every page for that month. Make this also an iframe? Or let the current month be rebuilt every time anyway as a trade-off?
@knadh knadh added the enhancement New feature or request label Dec 2, 2021
@faraazb
Copy link
Contributor

faraazb commented Dec 23, 2021

This is a great idea! Rebuilding the left sidebar on each run and iframing it into every page looks straightforward. We can also assume that per_page will not be changed for an existing site and iframe the page number section, so every month gets its own iframe.

Incrementally building pages seems complex, the last page could have less messages than the config[”per_page”]. We can work around this by rebuilding this last page, which requires figuring out its filename and the message ID of the first message on this page. Linking message replies between old and new pages will also need a few steps. To get a page’s first message or the page number a message belongs to:

  • We can make calculations based on per_page and row number of a message (assuming the per_page didn’t change) to get the required page numbers.
  • We could store the message ID range for each page like: (start_msg_id, end_msg_id, filename). This would be simpler and cleaner. It also tells us up to which ID the messages have been published.

@knadh
Copy link
Owner Author

knadh commented Dec 24, 2021

Thanks @faraazb. Yep, it's probably best to store the data in a new table, all behind a new --incremental=true|false flag.

@Seele0oO
Copy link
Contributor

image
This feature is very useful for me and I would like to know if there is any development progress so far?
Can I contribute to it?

@benborges
Copy link

Also wondering How I could contribute, this is the missing piece of this great piece of code!

@knadh
Copy link
Owner Author

knadh commented May 27, 2022

@faraazb's comment lays out a good starting point if you would like to attempt this. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants