Feature Request External label resolution

Sherwood Botsford sgbotsford at gmail.com
Sun Apr 20 12:47:04 EDT 2008

Milian Wolff wrote:

> Am Sonntag, 20. April 2008 schrieb Sherwood Botsford:

>> So perhaps I should ask a more general question:


> You build your whole page with Markdown? No underlaying CMS or similar?

> Especially if you consider that many links you really should think about

> installing a CMS.


>> How do you deal with large numbers of links?


> I use Drupal and write the contents in Markdown. But Navigation, related

> Links, Tags etc. are generated by Drupal - no Markdown there. The basic

> templates don't use Markdown either.



Currently I use template toolkit. Markdown is used as a filter
with tt2.

The navigation is handled in two stages:

1. A script called file_index runs find on my template
directory. It then reads in a file of sequence overrides.
(The default is alphabetical order, which is fine for 90%
of the files. The overrides allow me to change this, or to
mark regexes to be ignored.

At the end of this, I have an index file of all pages that
are to have menu items that is sorted in
the order that menu items should appear.

2. A template include does the actual menu build, whatever
parts of the menu show for that page in the order they are
in for that page. The menu at any given time shows the current
page/folder and it's parents as being open, but all other
folders are pruned. Net result: Even though there are a hundred
plus pages in the site, the menu never shows more than about
15-20 items, and the present location is always indicated
in a different color. So menu is also my breadcrumb trail.
(My pet peeve is sites where you chase links in circles.)

Index files for each directory are of the form

/Foo/Bar/Bar.html That is, Directory Bar has a file Bar.html.

This has some advantages for the site growing.

E.g. Initially I have Trees/Poplars.html

When I get enough time to write the individual pages for the
5 kinds of poplars, this becomes


Rerun file_index, rerun Ttree, and the links work.

I really like markdown, because it doesn't get much in my
way. I want to keep markdown. Typically for me to create another
page requires about 2 minutes plus the time to actually write the

I may end up hacking markdown and disabling the link resolution
mechanism, and create my own link resolution system as another
ttree filter. Or hacking markdown to do a db lookup instead of
a linear search through the file.

So Markdown at present only sees the links that are in my content
pages. And so right now there are only a dozen or so. But
as my site grows, the importance of jumping from page to page
via internal references will increase dramatically.

I'll take a look at Drupal.

More information about the Markdown-Discuss mailing list