Questions tagged [yaml-front-matter]

126 questions
25
votes
2 answers

Custom frontmatter variables with Markdown Remark in Gatsby.js

I am building a website using Gatsbyjs and NetlifyCMS. I've started using this starter https://github.com/AustinGreen/gatsby-starter-netlify-cms, and I am trying to customise it now. I want to use custom variables in the frontmatter of a markdown…
Robert Wolf
  • 1,312
  • 13
  • 18
21
votes
2 answers

How to make my post not public for a while?

I'm using jekyll and github pages. I'm currently busy with new post and it's not finished yet. I'm working from different places, that's why I need to push my changes to github. I created new post and push it on github. But after push my…
Viacheslav Kondratiuk
  • 8,493
  • 9
  • 49
  • 81
10
votes
2 answers

Is there a YAML front matter standard / validator?

I would like to use YAML front matter as a metadata holder for a general purpose data manager, e.g.: --- layout: "user" title: "Mario Brega" slug: "mario-brega" skills: - fire - water - leaf --- # Here I will be using Markdown yes I will, _I…
moonwave99
  • 21,957
  • 3
  • 43
  • 64
9
votes
3 answers

Eleventy (11ty) Data Pagination - Title from data

Trying to setup pagination with data, where {{ title }} in {{ title }} is the title of the current page as defined in projects.json Assumed this could be done: # main.njk {{ title }} #…
6
votes
1 answer

Allow optional GraphQL data in Gatsby

I'm trying to build a Type in my gatsby-node.js file that supports an optional value. Which I think is done with [String!]!. How can I load the new Type that I've created inside gatsby-node.js on home.js? gatsby-node.js: const path =…
Luke Brown
  • 1,854
  • 2
  • 28
  • 49
6
votes
2 answers

How to paginate posts by author

What I'm trying to do Jekyll can use front matter variables like tags and categories and access them with site.tags and site.categories to iterate over them using liquid. Now my problem is that I can't do this with a custom front matter variable…
blkpingu
  • 1,556
  • 1
  • 18
  • 41
6
votes
2 answers

Liquid filter collection where not null

In my front matter for some pages (not all) I have: --- top-navigation: order: 2 --- Using liquid I want to filter all site pages which have a top-navigation object and sort by top-navigation.order. I'm trying sort:'top-navigation.order' but…
Kurren
  • 827
  • 1
  • 9
  • 18
6
votes
2 answers

Gulp Front Matter +Markdown through Nunjucks

I'm working on adding some simple Markdown processing to my Gulp process, but I can't quite get the pieces to work together. I seem to be missing the step between getting the front matter content, and determining which Nunjuck template to…
Don H
  • 891
  • 2
  • 15
  • 24
5
votes
1 answer

How to use Jekyll to sort posts by a custom YAML front matter variable?

I'm trying to create a page in my Jekyll site that will display a custom variable and list the posts that contain that custom variable. I have created a movie review blog using a template Thiago Rossener created: Thiago's Template:…
zachsaul
  • 53
  • 4
5
votes
4 answers

Edit YAML Frontmatter in markdown file

Is there some way in ruby to edit the YAML Frontmatter at the top of a markdown file, like those used in Jekyll and Middleman? Something like: def update_yaml #magic that changes A: 1 to A: 2 in Frontmatter block end Then my markdown file which…
lyonsinbeta
  • 919
  • 6
  • 25
5
votes
2 answers

Jekyll - Can't Access Custom Front Matter Variables

I am new to Jekyll and would like to create additional variables in a Post Frontmatter: style: name: post img: image_name When I try to use a variable like title it works {% page.title %} But when I try to use another variable {% if page.img %} …
stefano_cdn
  • 1,362
  • 2
  • 15
  • 29
4
votes
2 answers

How to access the frontmatter using remark-frontmatter?

I am trying to use the remarkjs ecosystem to parse a file containing markdown and frontmatter, and turn it into HTML. The file could look something like this: --- title: Title --- # This is a heading I managed to parse the markdown, which can be…
muell
  • 383
  • 1
  • 15
4
votes
1 answer

How do I use an excerpt from Eleventy's gray-matter?

Goal: Display a post excerpt for each post in the post list of an Eleventy blog I'm adapting this starter project as my own blog. I'm referring to this Eleventy document to get the post excerpt. My code: I started by editing my .eleventy.js to…
Eleanor Holley
  • 691
  • 1
  • 7
  • 27
4
votes
1 answer

Hugo: how to store images in same directory as a post?

To have a cleaner layout, I want each of my posts to reside in its own directory along with all required assets like images and the like. Is this possible with hugo or any similar tool? If so, how? The problem is that files alongside each post don't…
user1050755
  • 11,218
  • 4
  • 45
  • 56
4
votes
0 answers

how to stop a .md file from being generating an html file in jekyll

i'm kinda new to jekyll. in my project i have few .md files(each file relate to a portfolio project). some of those need to generate separate .html files when built(which jekyll already does). but i want to exclude some files from being creating…
mahathun
  • 59
  • 1
  • 8
1
2 3
8 9