the main title of the self explanatory post about a custom made markup language

Every time you start a new line and place some text, you start a paragraph like this one.

If the line is preceded by | , then it becomes an indented block, like this one.

You can add ordered or unordered lists, like in markdown, minus the sub items. Here is an ordered list, starting with numbers followed by a dot:

  1. First
  2. Second
  3. Third

And here is an unordered list, starting with the star character * :

This is a subtitle

To write a subtitle, all you need is to start the line with subtitle: and begin your subtitle. Only subtitles are allowed, ie. no subsubtitles.

writing code

Code blocks or inline code snippets work just like in markdown. For inline code, you surround it with a backtick \` , and for code blocks you place an opening and closing set of triple \` in new lines.

images

Optionally, on code blocks you can specify the code language on the opening tag, but I have yet to include a code styler with neat syntax highlighting.

To include images, you can use the image: url | caption | title tag. You must include any url. After the url, you can include an optional caption, and an optional title, separating those with the | character. Here’s an example:

The Skating Minister
This is Wikipedia’s picture of the day: The Reverend Robert Walker Skating on Duddingston Loch, better known as The Skating Minister (1790s), by Henry Raeburn

plain HTML input

Some Markdown interpreters allow for HTML input. However, these tend to be limited to a subset of the language. For this reason, and because I am using such fancy tags as details and summary , I included HTML elements within the parsing. There is no validation, though, so if it goes wrong, it’s up to the ElementTree.fromstring() method to figure out. I’m not accountable for such sorcery.

Actually, the script will fail and there’s just no way to catch that now... that is, besides checking the Github workflow log for errors.

In any case, here’s an example of a small article:

<article>
<header>
<h3>my title</h3>
</header>
<p>A paragraph</p>
<details>
<summary>more</summary>
Here’s that hidden details I like so much… hah</details</details>
</article>

The above looks like this:

my title

A paragraph

more Here’s that hidden details I like so much… hah

comments!

Markdown has no comments but I included a comment feature, following JS and C (inline) comments. Thus, lines beginning with // are converted to HTML comments.

PS: There's a comment in this section of the post, go to the html file to see it rendered, or to the .txt file to read it.

meta description tags

One cool thing about this is that you can include meta tags with simple syntax. These are:

title

Anything after title: becomes the main title of the post. If this title is missing, the first subtitle is taken as title.

description

Anything after description: is the post’s meta description, which should be less than 200 characters. If this description is missing, the first paragraph is taken as such.

keywords

A list of comma-separated key words relevant to this post comes after keywords: .

time

A timestamp in the form of YYYY-MM-DD HH:MM:SS and an optional written-out version,separated by a | comes after time: .

For example: time: 2022-01-25 10:15:12 | Cloudy ☁️ Wednesday morning