Questions tagged [yaml-front-matter]

126 questions
4
votes
2 answers

Jekyll detect sass file with yaml front matter as page

I made a liquid template for navigation menu and tried to add active css rule to current active menu item. Here are my liquid tag to render the menu item:
    {% assign menu_pages = site.pages | sort: 'index' %} …
Hanif
  • 95
  • 1
  • 6
3
votes
1 answer

Reference Frontmatter in React MDX Markdown File

I have set up a next.js markdown blog using mdx: https://mdxjs.com/. I would like to be able to reference data in the frontmatter section within the mdx file itself. Something like this: // my-file.mdx --- title: "My blog post title" # {title} //…
Moshe
  • 6,011
  • 16
  • 60
  • 112
3
votes
1 answer

Including fontawesome brand icons on frontmatter metadata

I'm making some changes to a Gatsby starter and ran into an annoying problem with fontawesome brand icons. The problem is that unlike most icons, that are called faPhone or something like that, the brand icons also need a prefix ,fab. So I can make…
popcandy
  • 31
  • 1
  • 2
3
votes
1 answer

How to access the page front-matter data in 11ty from the code of a custom tag (shortcode)?

In Eleventy (11ty) the page source can define custom data in it's front-matter. E.g.: --- title: this is front-matter data --- Page content {% myCustomTag valueOfArg1 %} where the custom tag (also known as shortcode in Eleventy) is generating extra…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
3
votes
1 answer

Jekyll - How to set YAML front matter default for home page only?

I am currently developing a personal blog using Jekyll (using this blog post for an easy setup guide). I am trying to re-use an HTML file so that one url "/" displays some text while a different url "/posts" displays something slightly different. To…
Blundering Philosopher
  • 6,245
  • 2
  • 43
  • 59
3
votes
2 answers

markdownify post title in jekyll

It is possible to render Markdown on a post title? For example: --- title: Foo and _other foo_ --- I want that output

Foo and other foo

HufflepuffBR
  • 443
  • 3
  • 15
3
votes
2 answers

Jekyll - Front Matter defaults not working

Using Jekyll 2.5.3, I've tried to set default values in _config.yml (I'm just playing around to get a feel for it right now). I'm trying to set a default layout right now on a site I'm serving locally. I have set --watch and that's working fine.…
user1576628
  • 792
  • 3
  • 8
  • 25
3
votes
2 answers

Why are my Jekyll defaults in config not working?

I am setting the defaults in my _config.yml file but they are not being picked up: defaults: - scope: path: "" type: "posts" values: layout: "post" I am comparing it with another Jekyll site that I maintain where my…
joe sepi
  • 579
  • 1
  • 4
  • 9
2
votes
1 answer

Regex to match keys and array values inside a front matter

I'd like to match keys and some array values inside a front matter to convert them to tags in a translation memory. Basically, any matched key and value will be filtered out and appear as non-translatable tag. The system supports Java regexp. Here's…
Christian
  • 4,902
  • 4
  • 24
  • 42
2
votes
0 answers

Automatically add a YAML Front Matter in Typora

I am using Hexo to post my blog online and Hexo requires me to include a YAML Front Matter in my .md file so it can render the title in my online blog. Manually adding the YAML Front Matter title file is tedious. How can I automatically generate the…
Zeke
  • 23
  • 4
2
votes
2 answers

Attempt to read property "title" on array (Error Exception) Laravel Php

when I try to run the following it gives the Error Exception where it can't read the title on array. Can you let me know how to fix this? **My post code from app/models and as below **
2
votes
1 answer

Add custom HTML attribute to buttons of a Grav generated form

I created a Bootstrap form with the following footer:
2
votes
2 answers

Cant access custom Front Matter variables

Am creating my first Jekyll (using version 4.0.0) powered site. Problem is the variables in Front Matter are not recognized. HTML in _includes (writing-post-featured-image.html)
01e5Dk
  • 390
  • 1
  • 2
  • 14
2
votes
2 answers

Display language filtered posts by category in Jekyll

I run a Jekyll blog in multiple languages using the setup making Jekyll multilingual by Sylvain Durand without use of any plugin. All posts have the following markup: --- title: Hello world! lang: en ref: hello --- The posts are using the normal…
Liu Kang
  • 1,359
  • 4
  • 22
  • 45
2
votes
1 answer

Jekyll if statement in Front Matter

I would like to know if it's possible to add if statement in Front Matter to be selective about using attributes depending on page.url The pages are generated from .md file virtually from a plugin using a base template so I need to add some…
Seong Lee
  • 10,314
  • 25
  • 68
  • 106
1
2
3
8 9