-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Resolved reformat of blog posts #232
Conversation
Btw the page of blog posts with these changes gets crazy long. Adding some kind of pagination later would be great! |
@phillipj Here is a pagination plugin for metalsmith: https://github.com/RobinThrift/metalsmith-paginate. IMHO it would be nice to split blog posts into two groups:
both paginated. What do you think? |
Nice, I'll have a look at that plugin @fhemberger 👍 |
Sorry for not getting any progress on pagination! I've tried different approaches with |
1456777
to
d137a40
Compare
* through the handlebars process and therefore has the | ||
* entire page layout (w/<html>, <head> and <body> etc) | ||
* wrapped around the actual blog contents :( | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sums up my hours of trial'n'error to get this working.
Soooo... Basic pagination works now. It also exludes some specific tags to clean up the summary presentation as suggested by @mrkiffie. |
@fhemberger sounds like a very good idea! Would you consider it critical for the first release of this redesign or could post grouping be added later? |
I think it might be easier to start with a pagination by post year. Afterwards, try to get a different format for the current year. I have to look into this first, haven't had much time lately to look at the website issues here. |
I assume you mean easier for the end-user? As technically I'm guessing we On Wednesday, 18 November 2015, Frederic Hemberger notifications@github.com
|
Alright, I've been playing with this again. Started working on a metalsmith plugin which paginates by year. After seeing how many blog posts we have per year, it quickly became apparent we cannot show summary for all. Some quick stats:
Currently working on display summary for the latest 10 blog posts per year, but only titles for the following posts. Hopefully be up-n-running by the end of this week. |
2c42375
to
33c92ec
Compare
All finished and ready to go. Ended up creating https://github.com/phillipj/metalsmith-yearly-pagination to do most of the grunt work. PTAL |
ping @fhemberger / anyone, got any thoughts on this? Just updated the PR description with up-to-date info and three screenshots. I'd like to either merge or close this as it has been hanging around for quite some time now. |
@phillipj can you remove the standard list style formatting? i think it looks too 'vanilla html' |
@sup sure, just pushed the changes and updated the screenshots |
yup, absolutely looks good to me! this has been mocking me for a longer time now, didn't know there was a PR for it. but from my side, we can merge |
@phillipj Looking at the screenshots and briefly scanning the code, it seems to be a neat solution. Sorry, I don't have much time for a deeper review ATM. So if no one objects, go for it. |
With the new design on the blog post index, listing all blog posts is not a viable option anymore. This adds pagination by year and displaying summary for the top 10 posts per page.
Resolved reformat of blog posts
Thanks for reviewing! |
Hijacked PR #154 as it cannot be merged due to merge conflict issues and lack of response from the original authors.
This also needed cheerio added to package.json, which made the content generation to break. Not trying to make someone look bad, have forgot the same thing myself hundreds of times, but it highlights the need for smoketesting these PRs #225. That alert could have come from Travis when the initial PR was created, and of course prevented a bad merge & deploy.
UPDATED AFTER DISCUSSIONS BELOW
The original PR displayed title and first part of the blog post contents for all blog posts ever written. This PR adds pagination by year, and title + blog contents for the first 10 posts, followed by the remaining posts in that year by title only.
Screenshots showing (1) the first page of blog posts as of 2016, clicking "older" will take you to (2) all the blog posts of 2015 and (3) how blog posts look from the 10th posts and below.
1)
2)
3)