jandecaluwe / urubu

A micro CMS for static websites, with a focus on good navigation practices.
urubu.jandecaluwe.com
GNU Affero General Public License v3.0
179 stars 36 forks source link

Markdown conversion issue #5

Closed Forst closed 10 years ago

Forst commented 10 years ago

Hello!

First of all, thank you for Urubu! It's just the kind of static site generator I was looking for — fast and simple.

Now, to the actual question. I have for now created just one file named index.md, which contains the following:


---
title: Home
layout: fw_index
order: date

---
# Welcome!
This is a test ForstWoof from Urubu generator.

The code generated is this:

<h2 id="welcome">Welcome!</h2>
<p>This is a test ForstWoof page from Urubu generator.</p>

Why for one hash sign header it created a second-level header? According to the official Markdown specs, one hash sign means the header of the first level. I doubt that this is an issue of Urubu, but I don't know where else to post this. Thank you in advance for support!

jandecaluwe commented 10 years ago

My implicit assumption is that a page should have a single h1, reserved for the title. Note that the page title is set as an attribute in the front matter. Therefore, I have set up the Markdown processor so that h2 is the base level for headers.

I realize there are other opinions, and if necessary we can consider to make this parametrizable.

Forst commented 10 years ago

So the template should contain something like this, right?:

<h1>{{ this.title }}</h1>
jandecaluwe commented 10 years ago

Yes, for inspiration check the templates in doc/_layouts in the urubu repo. (The doc subdir has the source for the documentation site at http://urubu.jandecaluwe.com.)

Forst commented 10 years ago

Got it. Thank you very much!