質問

When I include a file with the .md extension in my Jekyll project, the markdown just shows up as plain text, totally unformatted, when deployed to github pages which is my target, and locally.

I think I have faithfully followed the directions in these guides, but must have missed something:

I have tried not including any markdown directives in _config.yml, thinking that jekyll would know what to do anyway. Out of frustration I started adding directives. The result is always exactly the same: unformatted markdown appearing as plain text.

Here's my _config.yml:

markdown: kramdown
markdown_ext: md
kramdown:
  input: GFM
kramdown:
  auto_ids: true
  footnote_nr: 1
  entity_output: as_char
  toc_levels: 1..6
exclude: ['myblog.sublime-project','myblog.sublime-workspace']
safe: true
lsi: false
pygments: true
source: .
title: My blog Title
tagline: Some little witty quirky phrase

Here is what my directory structure looks like:

├── _data
├── _drafts
├── _includes
├── _layouts
├── _posts
├── _site
│   ├── 2011
│   │   └── 01
│   │       └── 02
│   ├── 2014
│   │   ├── 02
│   │   │   └── 15
│   │   └── 03
│   │       ├── 03
│   │       └── 07
│   ├── assets
│   │   ├── css
│   │   ├── images
│   │   └── js
│   └── images
├── assets
│   ├── css
│   ├── images
│   └── js
└── images

and in _posts I have a post that ends with .md

役に立ちましたか?

解決

I have figured out the issue. It boils down to using these handlebars to render content:

{{ content }}

rather than these

{{ page.content }}

...which is confusing, because the only way to access other page variables is with the page namespace:

{{ page.blurb }}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top