oldcomputernerd.com/md/sample.md

3.3 KiB

Markdown file 2

This file was linked to from our first file. I want to see if it will still be wrapped in the plugin header and footer. If it is, then we're golden!

Also, I want to see how the paragraphing works with this markdown parser. Will it give me a nice clean break between paragraphs, and legible line wraps, or will it be crushed and stretch and ugly like some of these parsers tend to work. I'm just rambling on here, in order to make this paragraph as long as I can manage. If this works well, I won't even need HUGO by the time I'm done!

So, this is where another lengthy paragraph would start. I'm not going to carry on too long. I just want to see about the gap between the two paragraphs. I also want to see what it looks like to have sub-headingsin a document. So, let's start a sub-heading.

Sub-Heading

I've started a new sub-heading here. Let's see what this looks like. Another thing I'm curious about, is how the plugin will respond to actual html tags in the markdown. For example, an IFrame with a video embed:

Next Test

Ok, so embedding an IFrame works out of the box. But, what about more complicated things, like divs or snippets of javascript? Lets see how that works out. First, here's a div with a span inside of it.

This is some text inside of the custom span

Well, that's just grand! It seems that I can drop any html I want into any markdown I want, and it will render just fine! Ok, but what about, say, syntax hilighting, which requires a javascript?. Let's find out. For this, all I should need to do, is provide a markdown codefence, specifying the language, because the apache plugin will render it as <pre><code class="language-whatever"> which is what both highlight.js and prism.js use. In this case, we'll make a python snippet. The key issue here, is that I already have css theming for the code fence. So, will the javascript override it, merge with it, or be ignored? We shall see:

print('Hello, World!', end=' | ')
print(100, end=' | ')
print(5 + 5)
vowels = ['a', 'e', 'i', 'o', 'u']
popped_item = vowels.pop()
print(popped_item)
print(vowels)

And there we have it! Highlight.js works, but it overrides my global css, essentially overlaying the pseudo-amber-screen I created, with it's own theme. That's fine, for now. I picked one as close as possible to my theming, but more work will be needed in the future.

If don't want to use the highlighting, I can always just use a generic (unlabelled) fence:

10 PRINT "HELLO"
20 GOTO 10

Final Test

Now, can we add an Iframe with a display of plain text in a different file? If I can do that, then I could even show you this particular markdown file in its raw form. So, you can see there's no special trickery here, beyond the magic of the markdown plugin for Apache2.

The index.md file:

The sample.md file (the one you're reading now):