Questions tagged [yaml-front-matter]

126 questions
0
votes
1 answer

Jekyll: Liquid custom output statement for dynamic CSS classes

My Jekyll website has two kinds of content: personal, and professional. I would like to emphasize which kind of content a visitor is currently reading with dynamic CSS classes: If the visitor is on a page tagged as "personal", my
element's…
Robin Métral
  • 3,099
  • 3
  • 17
  • 32
0
votes
0 answers

Jekyll Mobile view "partly" not rendering, after yaml-front-matter was added to index.html

Problem? For some reason the first section below header (it is a "mobile friendly" website) is not being rendered in mobile view. It remains blanco. It is only a small part of the CSS, so It's not a obvious CSS issue either. What I have done? 1)…
0
votes
0 answers

Customizing a Jekyll theme does not include files included in the frontmatter from the gem

(Disclaimer: Jekyll noob here - using version 3.5.2) I am trying to customize a Jekyll gem-based theme. I am aware that in order to do this I have to locate the files I want to overwrite (bundle show theme-name), copy them locally and then edit…
spygi
  • 412
  • 3
  • 10
0
votes
1 answer

How can we create custom liquid variables within variables (i.e., custom liquid objects)?

Let us consider the following code: --- layout: post title: "Welcome to Jekyll!" test: name: google.com --- {{ post.test.name }} {% assign addr="https://www.google.com" %} # Heading This is a link to [the Google homepage!][ghome] This is…
Somenath Sinha
  • 1,174
  • 3
  • 16
  • 35
0
votes
0 answers

problems with jekyll frontmatter

I'm trying to use jekyll. I'm running elementary 0.4.1 loki. My index.html currently consists of this (with --- above and below layout:default): index.html: --- layout: default --- My understanding is that jekyll should read that and look to my…
0
votes
1 answer

Accessing Jekyll collection file from subdirectories

I'm still learning Jekyll, but I am trying to port our documentation over so that people can access our docs when we update them in our product. Ideally, I wanted to make this as seamless as possible. Our product docs are already laid out in .md…
Clayton Dukes
  • 1,297
  • 2
  • 11
  • 30
0
votes
1 answer

Splice path with Gulp-data

How do I get the name of the parent folder using gulp-data? Currently I'm using the following: In my front matter --- title: 'some title' ---- from my gulp file: function fm2json() { return gulp.src('src/pages/**/*.html') …
user2816197
0
votes
1 answer

Custom front matter var doesn't work anymore on Jekyll

I have a problem with custom front matter vars that were working fine until now. I have this in my page : --- has-cart: true; --- and this in an included snippet : {% if page.has-cart == true %}lorem ispum{% endif %} And it doesn't work anymore.…
0
votes
1 answer

Using post header variables in custom layout in Jekyll

I've to define a post like as shown which is derived from mylayout.html: --- layout: mylayout title: "My Post" varA: default --- This post is bla bla bla ... How can i have a layout that makes use of varA in mylayout.html?. I wish to achieve…
SACn
  • 1,862
  • 1
  • 14
  • 29
0
votes
1 answer

GitHub Pages - frontmatter causes page to break

I am publishing pages from my /docs folder as per https://github.com/blog/2228-simpler-github-pages-publishing If I include this front matter on a page, the build breaks. --- layout: page title: "Help Page" permalink: /help --- The page is built…
Terence Eden
  • 14,034
  • 3
  • 48
  • 89
0
votes
1 answer

Front Matter Global Variable on all pages in BigCommerce theme

I'm trying to create a dropdown menu when the user hovers over in my navigation displays account information such as previous orders. I'm using Stencil/Cornerstone. I've tried declaring a Front Matter Object on page.html using --- customer: …
0
votes
1 answer

How to access the article layout data property in middleman 4?

I am trying to migrate my blog from Middleman 4. In my index.html.erb file I have code like this: <% page_articles.each_with_index do |article, i| %> <% if article.data.layout == 'post' %> <%= partial "post", :locals => { :article =>…
Jozef Legény
  • 1,157
  • 1
  • 11
  • 26
0
votes
1 answer

Liquid - parse YAML front matter in string

I'm running a Jekyll site that uses JSON as data in my _data folder. I'm looping through the file like normal doing things like {% for item in site.data.resources.items %} just fine. However, I'd like to parse YAML front matter that is within a…
chris_s
  • 1,051
  • 4
  • 14
  • 28
0
votes
1 answer

Running two separate "Blogs" on one Jekyll install

I'm trying to set up a multi-blog in Jekyll one for my writing and then another section as a portfolio of sorts. My folder structure is as follows: on /blog I am seeing posts from both sites even though I'm separating by category. Any thoughts on…
0
votes
1 answer

Using Pelican Static Site Generator for something other than a blog

I'm trying to use the Pelican Static Site Generator to create a static site which is not a blog. Each markdown file inside the content/posts folder contains the following data. --- name: Product Name here price: Product Price goes here image:…
Ishan
  • 3,931
  • 11
  • 37
  • 59
1 2 3
8
9