Skip to content

Allow Hugo to parse "plain" Markdown #6098

@lucperkins

Description

@lucperkins

I work on a lot of OSS documentation projects, and I strive to use Hugo in all of them (I can point to 20+ projects that I've used Hugo for). One of the downsides of Hugo is this: many people want to be able to use a directory full of "bare" Markdown in conjunction with Hugo, but they can't, which means that they need to provide some kind of "bridging" solution that converts that Markdown into something consumable by Hugo.

By "bare" Markdown I mean Markdown with:

  1. No page metadata specifying the title, params, tags, etc.
  2. Links to /docs/foo.md rather than /docs/foo (because the links are to Markdown pages, not rendered HTML pages).

So what usually happens is that people create some kind of build pipeline using tools like Gulp.js that adds page metadata, converts links, etc. It would be fantastic if Hugo provided you the option to:

  1. Derive the document title from, say, the first <h1> or maybe the first header.
  2. Automatically convert /foo.md links to /foo (or even make the .md configurable).

Imagine the ability to do this (just spitballing here):

hugo server --convertLinks "md" --inferTitle --source my-github-repo

As with issue #6095, I'd be happy to take on this work if others think it's a good idea. I'm not sure how useful this would be to others. I do know that it would be immensely useful to me and I can think of many projects that would benefit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions