yaml-front-matter

Grouping categories in hexo

别来无恙 提交于 2019-12-25 01:44:51
问题 I would like to group categories in hexo. While the hexo <% list_categories %> helper lists all my categories alright, I would like to group nested categories right. My question is on two levels, first, how do you represent the subcategories in the front matter. In other words, how would I add the subcategories [motosport, cricket, basketball, hockey] into the following front matter. sports is the main category categories: - sports Two, how do I enumerate through all categories and each of

Jekyll - YAML Front Matter Defaults not working

不想你离开。 提交于 2019-12-24 12:43:49
问题 I have a multi-site Jekyll project with folders for each site, slc , and la . However, my YAML Front Matter defaults are not working. None of the default values--including the layout, crucially--are being transmitted to my templates: //config.yml: defaults: - scope: path: "la" values: layout: "default-la" title: "Store Title" email: "email@gmail.com" baseurl: "" # the subpath of your site, e.g. /blog/ url: "http://url.com" // Folder structure ├───assets │ ├───images │ └───js ├───css │ ├──

Jekyll custom date

╄→гoц情女王★ 提交于 2019-12-24 11:46:03
问题 I want use bellow code to display custom date in my Jekyll site {% assign m = page.date | date: "%-m" %} {% case m %} {% when '1' %}Januar {% when '2' %}Februar {% when '3' %}März {% when '4' %}April {% when '5' %}Mai {% when '6' %}Juni {% when '7' %}Juli {% when '8' %}August {% when '9' %}September {% when '10' %}Oktober {% when '11' %}November {% when '12' %}Dezember {% endcase %} But I don't now where to put it (I tried in post.html but does not work) 回答1: I've made a template for this.

Custom frontmatter variables with Markdown Remark in Gatsby.js

好久不见. 提交于 2019-12-05 13:32:25
问题 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 file like this: --- templateKey: mirror nazev: Černobílá title: Black and White cena: '2700' price: '108' thumbnail: /img/img_1659.jpeg --- I want to acess this data with GraphQL. I use gatsby-source-filesystem and gatsby-transform-remark. This is my

Jekyll: including a post inside another post

痞子三分冷 提交于 2019-12-04 21:20:54
Does Jekyll provide a way to include a post inside another post? I know that sounds a bit goofy, but I'm using it for a cooking/recipe site. Some of my recipes are made up of components, or other, smaller recipes. I'm looking for a way to include a handful of posts inside another post, complete with template and all. Is this possible? I did a ton of googling, and found I was only able to include into a page, not post, and it didn't use the default liquid template, just plain markdown. Ideas? dfosco I used Jekyll's Collections in my website to solve a problem similar to yours. Collections are

Custom frontmatter variables with Markdown Remark in Gatsby.js

若如初见. 提交于 2019-12-03 23:25:59
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 file like this: --- templateKey: mirror nazev: Černobílá title: Black and White cena: '2700' price: '108' thumbnail: /img/img_1659.jpeg --- I want to acess this data with GraphQL. I use gatsby-source-filesystem and gatsby-transform-remark. This is my query: { allMarkdownRemark { edges { node { frontmatter { templateKey nazev title cena price } } } }

Gulp Front Matter +Markdown through Nunjucks

淺唱寂寞╮ 提交于 2019-11-30 05:04:12
问题 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 apply. Here's the section in my Gulp file: gulp.task('pages:md', function() { gulp.src('./content/**/*.md') .pipe(frontMatter({ // optional configuration property: 'frontMatter', // property added to file object remove: true // should we remove front-matter

Is there a YAML front matter standard / validator?

允我心安 提交于 2019-11-29 09:01:56
问题 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 swear_ It is used by many static generators as: docpad.js; Jekyll; Middleman Question: is there a standard for that? Some tools that I can easily validate against, that for instance agree that all string values should be wrapped in quotes, that booleans