Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add author and keywords directives and CLI options for setting metadata #370

Merged
merged 6 commits into from
Aug 10, 2021

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Aug 9, 2021

Added author and keywords global directives and CLI options for setting metadata in the conversion output.

---
author: Yuki Hattori
keywords: marp,marp-slide,marp-cli
---
  • author: Set the name who made the slide deck. It is available in HTML, PDF, and PPTX.
  • keywords: Set comma-separated keywords for the slide deck. It is available in HTML and PDF.
    • In HTML, it can set <meta name="keywords"> tag. However, it is known as no longer used by Google since 2009. Don't expect improvement of SEO by setting keywords.

    • In PDF, keywords will store to PDF metadata by turning into semicolon-separated keywords, that is the best practice of PDF keywords. e.g. marp,slide,marp-cli -> marp; slide; marp-cli

    • keywords also accepts an array of strings in the global directive and Marp CLI configuration file.

      ---
      title: Marp slide deck
      author: Yuki Hattori
      keywords:
        - marp
        - marp-slide
        - marp-cli
      ---

      or

      marp slide.md -c ./config.json
      // config.json
      {
        "title": "Marp slide deck",
        "author": "Yuki Hattori",
        "keywords": [
          "marp",
          "marp-slide",
          "marp-cli"
        ]
      }

Resolves #367.

ToDo

  • Add tests
  • Update README.md

@yhatt yhatt merged commit c2071b1 into main Aug 10, 2021
@yhatt yhatt deleted the author-and-keywords-metadata branch August 10, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata in PDF export
1 participant