Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Images in markdown

Started by Muut Archive 11 years ago · 5 replies · 652 views
11 years ago

Hi all

I love file based CMS systems but I always had the problem with this:

I love to ahve some image grids in my blogs or full screen parallax images. But I cannot put html in the markdown file. Is there any way to just insert this in a markdown file and get it working?

- <div class="pure-u-1 parallax" data-parallax="scroll" data-image-src="{{ url("theme://images/image.jpg", true) }}"></div> -

Thanks!

11 years ago

First of all, HTML in markdown is perfectly valid, and there is nothing stopping you from doing it.

The second bit where you have some twig syntax in your markdown is valid also, but you must enable twig processing in the page header. So you can put:

YAML
process:
  twig: true

In the page header, then your code should work fine.

11 years ago

Are there any page variables that can grab the page title to use it in the page itself?

11 years ago

{{ page.header.title }} will display the title of the page

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1318 9 years ago
Archive · by Muut Archive, 9 years ago
2 915 9 years ago
Archive · by Muut Archive, 9 years ago
2 4024 9 years ago
Archive · by Muut Archive, 9 years ago
1 2900 9 years ago
Archive · by Muut Archive, 9 years ago
3 1082 9 years ago