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

Tags work as clickable filters to sort the content of news #36

Open
Sergyenko opened this issue Aug 18, 2021 · 1 comment
Open

Tags work as clickable filters to sort the content of news #36

Sergyenko opened this issue Aug 18, 2021 · 1 comment

Comments

@Sergyenko
Copy link
Collaborator

Let's make tags work in the way it works on the other blog / news sites

@Souravgoswami
Copy link
Collaborator

Souravgoswami commented Sep 22, 2021

The current implementation goes over all the articles and generates a page with the tags. I have added id to each header, so we can refer to a tag with /tags#ruby (ids are downcased). It makes the tags on home page clickable, where each tag is link to /tags#{{ article.tag }}

image

I think we can sort the tags by date of the most recent article, otherwise AND stays on top, for example.

Caveat
This can't be done like rails, where I can use &tags=ruby for example, and it does a database query. Jekyll has to generate a page full of tags. Thousands of tags will make the page very big. Currently pagination is done on the /archives/ so there's no way to add pagination/infinite scroll on tags. We can limit the numbers of items on each tags, based on dates, but we can't do anything dynamic here :(

What do you think?

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

No branches or pull requests

2 participants