-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
✨ feat: introduce a 'series of post' feature #406
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tabi-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I'll take a look during the week! Thank you. |
Thanks for the hard work!
I don't see a use-case for this. I like that you've added the ability to set placeholders for description and such. I think that's perfect.
You mean as it is now? With
I prefer simple. How about we get rid of the types? It simplifies the code and documentation. We can directly use the What do you think? I've made a couple of commits to render markdown on the header and description for the series.
I need to think about this. I don't like the idea of having empty articles just to showcase the series. I also don't like the idea of not having anything to showcase the series on the demo. I'm thinking of alternatives:
This is not a priority, though.
I'd lean towards using 100% the exact same navigation as the rest of the site (blog/main page). More cohesive, more maintainable, hopefully clearer for the visitors. Perhaps the only change I'd make is regarding the number/indexing instead/in addition to the date.
I'll take a look before merge.
Perfect. |
I've pushed a commit to simplify the style and make it more in line with the rest of the theme. BeforeAfterReasoning for the changes:
Having said that, I am open to reverting changes and modify further. This is just a quick attempt to increase cohesion with the rest of the theme. I'm open to feedback. |
As for types, it is just how much effort it will take to have consistent series across the website. An optional "jump to post" button may be useful as a per-series configuration.
Agreed
As a series description may be a full article, it might be a bit blurry where the article ends and where the posts' list starts.
Agreed
Agreed |
I just removed the types of introduction. |
Is this still the case? Could we leverage the hierarchy to solve this?
I understand the goal of the articles is to (1) document the feature and (2) showcase it. (1): I believe the feature documentation should be in one spot (max two, with a mention in Mastering tabi + its own post, if necessary) to avoid making users jump around. (2): This is where I think it might be a good idea to use a real website using tabi with the feature. I know I would implement it on my own site, for example. The goal is to not clutter the tabi demo with too many posts and to show a functional example.
Ah! Absolutely. Agreed. I'm not sure how to solve this. Having both is definitely ugly and confusing, even with the
I understand. It makes sense.
Yeah, this was my main concern. I'm not at all sure what the expectations would be for someone visiting a serie's main page. For now I'm leaning for an admonition tip on the docs similar to: Tip You can add a link to jump to the posts by adding a link to the anchor I'm definitely open to alternatives, though.
Fair point. What do you think about using the already existing i18n string |
It is not the case anymore.
Yes, exactly.
I completely agree it is ugly as it is today. I didn't invested much in design because I was not sure how to deal with it properly as well.
I had no time to test it yet. I'll give it a try and keep you posted.
Looks good. I'll implement it as soon as possible. |
Perfect.
Perfect as is.
The solution is not too user-friendly (though I guess people could copy-paste). I'll try to think of solutions this week.
I'll focus on this too. I hope to have some ideas before Friday. |
Thanks for your feedback.
I can see 3 ways to manage complexity here:
(edited to explain better the idea) |
I've added back the jump to posts: I've documented the feature on the cheatsheet article. It's visible on the PR demo here (forced to In short: it's shown by default with descriptions of over 2000 characters. Can be set in config or section, following hierarchy. |
Yeah, I like this idea. I'm thinking of how to implement this. We definitely need to account for no next/previous posts and make it user friendly to edit, without being overwhelming. Working on it! |
My last push:
Would love your feedback! And one question: is it possible right now to have the series sort by date, and have the same sorting as the current demo? (i.e. from oldest to most recent, instead of newest->oldest, like in the main page) That would be my ideal setup, but I don't think it's possible right now (though also not hard to add). |
This is awesome. You just moved the feature to the next level.
Right now, it is not possible. When not paginated, reversing pages order is programmatic (using the Regarding series pages sorting, I find slug interesting with page names starting with numbers One question on my side: It looks like the only remaining work is to transform the series into a single page and describe how to sorts pages and, if agree, how to style templates. Many thanks. |
I just merged the documentation in a single page in its current state. I put it in a page just before Mastering Tabi (which has to be updated as well) but please let me know if you prefer to have it at the end. I'll continue on documentation as soon as I have some time. |
The meta column of the blogposts list was fixed to 13.5rem. I can be annoying when displaying something else but a date as it was initially planned. Width set to 13.5rem has been kept when displaying a date to avoid any regression. Nevertheless, it is possible to get rid of it in the future if needed. Feed has been adapted accordingly.
If there is only one page, the pages selector at the bottom might not be displayed.
Extra features were already compatible with sections so it has been made explicit sections can be used as well.
It displays an explanation of the series and lists all its articles.
The reference is configurable from none to link to summary to something completely custom.
Custom placeholders are user-defined and can be used in both headline and description.
Navigation is similar to the one for all articles but is limited to those of the series.
Changes have been requested in Zola PR: getzola/zola#2653. This requieres minor adaptation on properties used to reversed pagination.
- Renames series_page_introduction_placeholders to series_template_placeholders - Removes `post_listing_index_reversed` in favour of outro templates - Docs!
Documentation might be almost ready. I did some clean up on remaining elements of removed features and useless articles and I also resolved the conflict with the main branch. This PR is almost ready for review. |
Summary
This PR introduces a series of posts feature.
It tries to cover all the discussion and proposal we had in the previous one: #360.
I noticed an important PR to improve style for RTL (#381).
I did my best to respect it but as I am not used to deal with RTL, I may have introduced some regressions.
I am not very happy with the rendering of the series navigation feature which is just a copy/paste of the global one.
IMHO, result takes too much space in the page and is too hard to easily distinguish from the usual navigation.
Feel free to propose anything which would fit better as I don't have much ideas.
Articles orders is broken in a series' page when using reversed pagination (as I cannot know it using the
get_section
function).I have a pending PR on zola to solve this: getzola/zola#2653.
Meanwhile, we just can put a big red warning in the documentation.
Neverthless, I am not sure pagination will be a real use case for series.
Documentation is not there yet (at least, you can look at the code :-)) but I thought using it to demonstrates some series features could be interesting.
I introduced 3 articles (some retroactively) with dummy text for that purpose. I'll make them complete soon.
Could you please let me know if it would be fine for you?
As usual, translation are missing (only English and French are here).
Others will have to be completed for sure but as I was only able to use automatic translation, I prefer to let you do those you know better.
I'll finish with automatic translation for the remaining ones.
Last but not least, I did a design choice I would like you to cross-check.
I decided to deal with elements related to a series in a page as macros to make clear that a series' section pages are not in the relevant order and we need to use a dedicated variables which has been sorted properly.
I thought it would be easier to remind for future evolution but I am not sure about this choice.
If useless, I can easily reintroduce everything in the page itself (as I did at first).
I tried to develop all features as much as I could but we can make some of them less complex if you think it doesn't worth it.
Some questions I have are:
I hope this will allow a great series feature and I am waiting for your feedback :-)
Many thanks.
Related issue
Discussion started in #256 .
Changes
Declaring a series can be done by creating a section with
extra.series
set totrue
.This section should be transparent.
Most of the tests have been done that way but non transparent section may work as well.
In order to reuse existing posts listing feature, I had to refactor it a bit to support not only dates but also indexes.
Serie's info displayed in a page is controlled through the variable
extra.series_page_introduction
in a series section and can be:Introduction (whatever its type) supports pre-defined and user-defined variables replacement.
Accessibility
Nothing special but I tried to respect what is already done (semantic HTML, ARIA attributes and colour contrast).
Nevertheless, I don't how to test any accessibility feature on my own.
Screenshots
I propose to use the documentation as a demo of the feature.
I introduced 3 dummy articles (some retroactively).
If this is accepted, I'll update them with relevant documentation.
Type of change
Checklist
theme.toml
with a sane default for the featureconfig.toml
commentstheme.toml
comments