Jekyll is not parsing a post correctly, and I can't find the error; the YAML front matter is the same as in our other posts. Here are the two differences:
(1) For some reason, Jekyll is rendering the three dashes at the bottom of the YAML front-matter as a single dash: category: German — Doch is a modal particle,. I have tried deleting these hyphens and retyping them, and that has not solved the problem.
(2) We are trying to create a new category with this post called "German." Jekyll has automatically created our categories from other posts, but in this instance, it is not creating the "German" category and is instead placing the post in a folder of its own.
When I open the page in the browser, I see this at the top:
layout: post author: WordBrewery title: “How to use the German doch” description: “How to use and understand the German modal particle doch.” image: hohenschwangau.jpg featured: true published: true category: German — Doch is a modal particle, a word used to indicate attitude, tone or the focus of a sentence.
Here is the YAML front-matter and first line of the post:
---
layout: post
author: WordBrewery
title: "How to use the German doch"
description: "How to use and understand the German modal particle doch."
image: hohenschwangau.jpg
featured: true
published: true
category: German
---
*Doch* is a [modal particle](https://en.m.wikipedia.org/wiki/German_modal_particle), a word used to indicate attitude, tone or the
I would greatly appreciate any help.
Appearance of the unparsed post
(Moved from comments to answer)
You need to make sure that the markdown file encoding is correct (utf8 no BOM). Jekyll has a problem with BOM in the front matter http://jekyllrb.com/docs/frontmatter/
Related
I'm using quarto's reveal.js implementation. I've been reading the official documentation page on customising themes and I'm relatively familiar with SCSS rules.
I've been able to create classes to slides and then customise them via SCSS rules. Regretfully, I haven't been able to add a custom background (either colour or, ideally, image background) to the first slide (#title-slide) covering the entire area, as I would do in other regular slides as described here.
Is there any way to add custom backgrounds to the first slide other than this hack consisting of leaving the presentation's attributes blank?
EDIT:
Not sure if that's the right approach, but I tried adding the background-image url in the yaml metadata and it works:
---
title: "My title"
background-image: "https://images.unsplash.com/flagged/photo-1580139624070-910f651c1b78?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80"
background-opacity: "0.45"
format:
revealjs:
theme: [default]
logo: images/logo_black.png
editor: visual
---
Regretfully, properties such as background-color and background-opacity don't work.
Just for the record, after #tarleb's comment pointing me to pandoc's documentation, I made it work by adding this on yaml's metada:
---
[...]
title-slide-attributes:
data-background-image: "/path/to/image"
data-background-size: contain
data-background-opacity: "number"
[...]
---
As can be seen, other attributes can be passed, as long as
they are indented under title-slide-attributes
they are prepended with data-
I have a book made of several ordered Markdown files. I am using Pandoc to convert those into an epub file, and things are mostly okay. I can embed the font I like and provide my own CSS, etc. The problem is that the output file contains an element that is not present in the Markdown (as a "#" header element). This element is then being picked up by the ToC function and inserted into the Table of Contents. I didn't ask for the element to be present, and I can't find an option to turn it off.
Here's how to reproduce, with a much simpler case than my actual one, but it's sufficient to demonstrate the problem. I have the following file structure:
- pandoctest/
- src/
- file1.md
- file2.md
- epub.yml
The contents are as follows:
file1.md:
Here is some text.
file2.md:
# Chapter one
The chapter goes here.
epub.yml:
---
title:
- type: main
text: A Book
creator:
- role: author
text: Some Dude
---
And the pandoc command I'm running is:
pandoc -o output.epub epub.yml --toc src/*
The end result is something like this:
Page 1: An appropriate title page using the title and author elements from epub.yml
Page 2: The table of contents page. At the top, the title from epub.yml. Beneath that are two ToC entries. The first is the title of the book and refers to the element I don't want present on the next page. The second is "Chapter One" which refers to the # Chapter One element from my Markdown (this is appropriate).
Page 3: First, the undesired element, which, in the raw XML looks like this:
<h1 class="unnumbered" data-number="">A Book</h1>
Then, "Here is some text", a paragraph that I did indeed tell it to put there.
Page 4: A correctly rendered "Chapter One" page.
The question here is how to get pandoc to not render the "unnumbered" header element that is not present in the Markdown. It screws up the Table of Contents and I never asked for it to be there.
For reference, here is the epub that is rendered from my little test here: https://www.dropbox.com/s/dj4jo08g7q4f9i2/output.epub?dl=0
I'm working on developing a business site for a friend using GasbyJS and NetlifyCMS for content. I'm running into a bit of an issue determining how to use the CMS to maintain Markdown-formatted information that is not structured like a blog post, since that's where a lot of the tutorials out there work from.
My Netlify CMS config is as follows:
backend:
name: github
repo: my/repo
media_folder: static/assets
public_folder: assets
collections:
- label: 'Pages'
name: 'pages'
files:
- label: 'Home Page'
name: 'home'
file: 'content/home.yml'
fields:
- {
label: 'Home Banner Text',
name: home-banner-text,
widget: markdown,
}
- {
label: 'Home Acting Text',
name: home-acting-text,
widget: markdown,
}
- {
label: 'Home Costume Design Text',
name: home-costume-design-text,
widget: markdown,
}
- {
label: 'Home Modeling Text',
name: home-modeling-text,
widget: markdown,
}
Which produces a YML file at C:/path/to/my/site/content/home.yml thus:
home-banner-text: 'Welcome to my site!'
home-acting-text: I **am an actor.** Click here to learn about my acting work.
home-costume-design-text: I am a costume designer. Click here to learn about my costume design work.
home-modeling-text: I am a model. Click here to learn about my modeling work.
This all seems fairly straightforward and, I think, logical -- the site is going to have a home page with four content sections on it, and I want the site owner to be able to modify each one with formatted content.
What I can't figure out is how to transform this in Gatsby once it's sourced via gatsby-source-filesystem. There's a gatsby-transform-yaml package, but it doesn't transform any Markdown in the YML field values to HTML, and while I've found a few packages that extend it by adding Markdown support, they all require some sort of prefix on any Markdown values (i.e. home-acting-text: md//I **am an actor.**) in order to determine which ones should be parsed, and I can't figure out any way to get Netlify CMS to inject that.
It seems like I'll probably have to do some custom logic in gatsby-node.js but I'm a little lost on where to start -- and this seems like a common enough use case that I wonder if I'm missing something.
Any guidance would be appreciated! :)
Have you checked the Gatsby docs? Im assuming you have, but if you havent then i suggest starting there. A quick search reveals this: Sourcing from Netlify CMS
I'm using Pandoc to generate a PDF from markdown. When specifying header/footer information in the YAML metadata (as below), I continue to get a page number in the center of my footer (with the text of \fancyfoot[L] written overtop), in addition to the page number in footer on the right that I've specified with \fancyfoot[R].
How can I remove the default page number in the footer at center? If I use \pagenumbering{gobble} it just removes all page numbers, at center and on right.
---
title: Test Title
author: Author Name
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyhead[L]{Author Name}
- \fancyhead[R]{Test Title}
- \fancyfoot[L]{Extra text here}
- \fancyfoot[R]{\thepage}
---
Currently using Pandoc 1.17.2 on OSX 10.11.6.
Well, I think this should work if you just give the center field an empty content field. That is at least one way in which it works in Latex and hopefully the same for pandoc.
\fancyfoot[C]{}
I put references in a yaml metadata-header:
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
...
(described here: http://johnmacfarlane.net/pandoc/README.html#extension-citations)
and I can cite this reference with See [#fenner2012a]....
This will create an output in the pdf like this: See ("One-click science marketing")... with no hyperlink on the reference.
Instead of the title I want to have auto-incremented number: See [1] with [1] being a hyperlink to the source. How can I achieve this?
Instead of the title I want to have auto-incremented number: See [1] with 1 being a hyperlink to the source. How can I achieve this?
Many CSL styles have a numeric format; you can try ACM Computing Surveys.
To specify the style, pandoc's documentation says:
These files are specified using the --csl option or the csl (or citation-style) metadata field.
There's one caveat when going to PDF, however. I haven't found a way to get the hyperlinking to work.
That is, you'll get See [1] but there is no hyperlink.
Edit: You can get this to work by using the following setting in meta-data:
link-citations: true
You can get hyperlinks in PDF by using LaTeX's way of formatting references. But I think you'll have to convert your reference to .bib format and specify it in your metadata:
bibliography: references.bib
pdf:
cite-method: biblatex