Zren / zren.github.io

https://zren.github.io/
12 stars 2 forks source link

Media wiki syntax #2

Closed CarlSchwan closed 5 years ago

CarlSchwan commented 5 years ago

Hello, thanks for the https://userbase.kde.org/Plasma/Tips page, the content is great.

I found out that this page doesn't use the same formatting as the other pages in userbase. Some issues are that in userbase the element is used for GUI items, → (→) is used instead of > (>), the {{Path|....}} template is used for path, title aren't link.

Do you think this could be easily fixed? Otherwise, it's not very important.

Zren commented 5 years ago

I write tips down in markdown, since it's way easier to add new tips and have all the formatting + anchor hashtag linking to it than fussing with MediaWiki. In order to indent outside of a list in MediaWiki, I'm abusing the <dd> html tags.

Replacing > with a

Mediawiki converts > to &gt;, but so long as I make sure to ignore the code tags, it might be doable. I probably also need to replace => as well as I used that at least once.

{{Path|....}} template is used for path

I might be able to see if the code tag starts with `/...` or `~/...` and use that template.

I also notice the <keycap>Alt + F2</keycap> "template" so I guess I need a fancy regex to check for (Ctrl|Alt|Shift|Meta) or F\d+ in the code tag contents. Though that will have a false positive with:

We need to set Meta= under the group...

So it would need to be a pretty strict regex.

Zren commented 5 years ago

There's also the <menuchoice>Control -> Sort by</menuchoice> syntax used in the dolphin page. I'm not really a fan of using that template however since I'd be highlighting every single line of text on my tips page. It would make the currently highlighting code tags not stand out anymore. That template seems to be for highlighting a choice in a large paragraph of text.

Zren commented 5 years ago

{{Path|....}} wraps the text in <tt>....</tt> which appears to only use a teletype text (monospace font).

It did not put any other emphasis (a background highlight) on the text, making it worse than the code tag. So I won't be using that. If the KDE wiki CSS style changes, I'll consider it.

I replaced the arrows and shortcuts though. Will push in a bit.

Zren commented 5 years ago

I've done Chevron > unicode arrows, and keycap tags for shortcuts. Thanks for getting me to look for other formatting like keycap, as they now stand out more. The chevron arrows didn't look that good with the KDE CSS either.