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

Handle MediaWiki categories #6

Closed
peterjc opened this issue Mar 3, 2015 · 3 comments
Closed

Handle MediaWiki categories #6

peterjc opened this issue Mar 3, 2015 · 3 comments

Comments

@peterjc
Copy link
Owner

peterjc commented Mar 3, 2015

e.g. [[Category:Cookbook]] (generally as the last line in a page) flagged it for inclusion in the special wiki page .../wiki/Category:Cookbook.

Can we map these to Jekyll tags in the markdown header?

@peterjc
Copy link
Owner Author

peterjc commented Mar 7, 2015

Looks doable, e.g. http://www.minddust.com/post/tags-and-categories-on-github-pages/

We'd likely need something like this in the ``wiki/Category:Cookbook.md` file,

{% include Category_Cookbook %}

which would need a matching file _includes/Category_Cookbook to generate the list of all pages tagged with this category.

peterjc added a commit that referenced this issue Apr 8, 2016
This is a simple work-in-progress so that don't get Error 404
missing pages, see issue #6.
@peterjc
Copy link
Owner Author

peterjc commented Apr 10, 2016

Now that I stopped ignoring the category pages in the conversion script, they are converted and exist as files e.g. wiki/Category:Wiki_Documentation.mediawiki or wiki/Category:Wiki_Documentation.md - and any text on the page is of course converted. What is missing is the automatic links to all the pages tagged with that category which MediaWiki would had added to the end of the page, meaning they are not yet very useful.

However, links on other pages to the category are breaking due to the special colon syntax, which I think is best fixed from pandoc: jgm/pandoc#2849

Failing that, we could pre-process the MediaWiki files before giving them to pandoc, or post-process the MD files from pandoc?

@peterjc
Copy link
Owner Author

peterjc commented Apr 10, 2016

I've been reading http://jekyllbootstrap.com/lessons/jekyll-introduction.html and while Jekyll has categories, they are hierarchical (you can't put a page in two different categories). e.g.

---
title :  Hello World
categories : [lessons, beginner]
---

Here you would get a single nested category "lessons/beginner"

Jekyll tags look like a better match to MediaWiki categories, e.g.:

---
title :  Hello World
tags : [lessons, beginner]
---

peterjc added a commit that referenced this issue Apr 10, 2016
peterjc added a commit that referenced this issue Apr 10, 2016
Attempts to side-step jgm/pandoc#2849
as part of resolving issue #6.
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

1 participant