-
Notifications
You must be signed in to change notification settings - Fork 272
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
Show tags/categories on pages #104
Comments
Hi @peterjc , can you provide two working pages as a reference example? If I managed, I would like to have a go. |
We don't have any examples of this yet - I believe all we need to do is add something to the template and all the pages will have links to the relevant pages from their (already defined tags). The template code on https://github.com/biopython/biopython.github.io/blob/master/_layouts/tagpage.html does the opposite, it lists all the pages with a tag. I think showing the tags (Jekyll terminology, these were originally categories under MediaWiki) on each page means learning more about the liquid template language and adding code to https://github.com/biopython/biopython.github.io/blob/master/_layouts/wiki.html to list all the tags on a page (perhaps as a simple header or footer). This will use There are various blog posts on this kind of thing, e.g. https://codinfox.github.io/dev/2015/03/06/use-tags-and-categories-in-your-jekyll-based-github-pages/ - hopefully you can find something simple which works. |
Thanks for the clarification. I would like to carry one some tests on the forked repo, but I don't know how to deploy the pages. What is it used for this project? |
Nice example :) The key point looks to be this markdown/XML/liquid snippet: <ul class="tag_list_in_post">
{% for tag in page.tags %}<li class="inline tag_list_item"><a class="tag_list_link" href="/tag/{{ tag }}">{{ tag }}</a></li>{% endfor %}
</ul> That is in
Then there would be some CSS to style this bullet-list of tag links. I can see how to adapt this to our tags for the (former MediaWiki) categories like documentation and cook-book. -- We're using GitHub pages. The lazy option (assuming you are not using GitHub Pages for a person repository) is to call your fork Gasta88.github.io Otherwise you'd need to install and run Jekyll locally, see #79 |
I've been trying for a week to apply any possible suggestion that I've managed to find on the web...but no joy. Alternatively, would it be possible to consider an edit of the wiki pages? |
@Gasta88 I don't know how far you were able to get, and if you were trying something similar or not, but inspired by the example you found I was able to get this to work. Thank you! |
Great to hear! I couldn't get that far, but I'll gladly peek at your solution for future references. |
e.g. http://biopython.org/wiki/ABI_traces should have a link to the Cookbook category http://biopython.org/wiki/Category%3ACookbook added automatically via the tag meta-data already in the header.
The text was updated successfully, but these errors were encountered: