Stefan_EOX
Stefan_EOX

Reputation: 1531

Don't output markdown in Jekyll build, only HTML

When I build my site using Jekyll, I get both the raw Markdown and the rendered HTML files in the _site output directory. How can I tell Jekyll to not output the .md files?

Screenshot of Jekyll output directory

PS.: It's not a breaking flaw, but it creates noise and the direct link to the .md files can be entered in the browser, which I also don't want.

Edit (as requested in the comments):

I build using build exec jekyll serve and host on Github Pages: https://github.com/junge-pfarre/junge-pfarre.github.io

These are the relevant parts of _config.yml:

defaults:
  - scope:
      path: ""
    values:
      layout: "default"
  - scope:
      path: "assets/flyer"
    values:
      flyer: true

markdown: kramdown

permalink: :title

The markdown files don't have a frontmatter (e.g. gebete.md):

# Gebete

_Hier soll es in Zukunft von uns selbst geschriebene Gebete geben._

Upvotes: 1

Views: 398

Answers (1)

marcanuy
marcanuy

Reputation: 23982

Add front matter to each markdown file and jekyll will process them generating the HTML version in _site directory, leaving original md files out.

Upvotes: 2

Related Questions