hagenburger / pimd

PIMD – Processing Instructions for Markdown
https://hagenburger.github.io/pimd-docs/
MIT License
20 stars 5 forks source link

New command: title #17

Open hagenburger opened 6 years ago

hagenburger commented 6 years ago

New feature

This command will change the title of the document.

Specifications

<?title string ?>

Example usage

test.md:

<?title My document title ?>

# First headline

Text

Rendered result (when test.md gets rendered as document):

<html>
  <head>
    <title>My document title</title>
  </head>
  <body>
    <h1>First headline</h1>
    <p>Text</p>
  </body>
</html>

Info: The example above is a bit shortened. The important part: The <title> gets the right content.

Unwanted

By default the content of the first headline becomes the title. This should not happen, when the title command gets used:

<html>
  <head>
    <title>First headline</title>
  </head>
  <body>
    <h1>Main Markdown file</h1>
    <p>Text</p>
  </body>
</html>
violetadev commented 6 years ago

#17 New command: title