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

Creating Pages

Started by Muut Archive 11 years ago · 2 replies · 238 views
11 years ago

I've created a few pages using markdown but I was wondering if there was a way to use a twig file or something else besides markdown.

11 years ago

You can use Twig in your markdown if you enable twig processing in the page header.

Generally speaking the markdown is your data and the matching Twig template is for your rending that data. You can have no markdown at all (just some headers to set title perhaps), that is named mypage.md, and then create a mypage.html.twig in your theme that does whatever you like for that page, ignoring the content of the markdown entirely. So yes, you can create a page with purely Twig if you like. We do this in our test pages quite a bit.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1321 9 years ago
Archive · by Muut Archive, 9 years ago
2 916 9 years ago
Archive · by Muut Archive, 9 years ago
2 4047 9 years ago
Archive · by Muut Archive, 9 years ago
1 2921 9 years ago
Archive · by Muut Archive, 9 years ago
3 1105 9 years ago