Jekyll

Jekyll posts filenames without dates

孤人 提交于 2021-02-19 03:44:05
问题 I don't care about dates because I edit my previous posts all the time, so I would like to replace _posts/2015-05-05-something.md by _posts/something.md . 回答1: Using pages doesn't require files to have dates, eg: _posts/2015-05-05-something.md becomes something.md . (The answer came from the amazing Github support) 回答2: To do it you need to edit _config.yml file. Variable you are interested in is permalink . Jekyll has 4 build-in styles: date - /:categories/:year/:month/:day/:title.html

Jekyll encoding name of category special characters

Deadly 提交于 2021-02-18 17:09:37
问题 My Jekyll installation used to work. Since an update, I face an issue with URL containing tag names which have some special characters. I now get an error message when trying to reach a URL with special characters in it like http://127.0.0.1:4000/tag/Actualit%C3%A9%20europ%C3%A9enne/ , where Actualité européenne is the name of a category. The error message is incompatible character encodings: UTF-8 and ASCII-8BIT . All the files in _posts directory are utf-8. Here is the stack trace : [2017

Jekyll encoding name of category special characters

允我心安 提交于 2021-02-18 17:09:33
问题 My Jekyll installation used to work. Since an update, I face an issue with URL containing tag names which have some special characters. I now get an error message when trying to reach a URL with special characters in it like http://127.0.0.1:4000/tag/Actualit%C3%A9%20europ%C3%A9enne/ , where Actualité européenne is the name of a category. The error message is incompatible character encodings: UTF-8 and ASCII-8BIT . All the files in _posts directory are utf-8. Here is the stack trace : [2017

Jekyll encoding name of category special characters

≡放荡痞女 提交于 2021-02-18 17:09:28
问题 My Jekyll installation used to work. Since an update, I face an issue with URL containing tag names which have some special characters. I now get an error message when trying to reach a URL with special characters in it like http://127.0.0.1:4000/tag/Actualit%C3%A9%20europ%C3%A9enne/ , where Actualité européenne is the name of a category. The error message is incompatible character encodings: UTF-8 and ASCII-8BIT . All the files in _posts directory are utf-8. Here is the stack trace : [2017

Using Jekyll, how do you alter an array's contents using a for loop?

二次信任 提交于 2021-02-08 09:57:25
问题 Say I have an array thingy.foo = ['abc', 'def'] in my scope. My goal is to be able to loop over all the items in thingy.foo and apply some conditional logic to it, overwriting the existing item in the array... Something like this: {% for item in thingy.foo %} {% assign thingy.foo[forloop.index0] = site.data.lookups[item] | default: item %} {% endfor %} What I am doing do the item is a bit irrelevant, the part I'm having issues with is updating the item in the array. The code compiles and runs

Using Jekyll, how do you alter an array's contents using a for loop?

我的未来我决定 提交于 2021-02-08 09:56:58
问题 Say I have an array thingy.foo = ['abc', 'def'] in my scope. My goal is to be able to loop over all the items in thingy.foo and apply some conditional logic to it, overwriting the existing item in the array... Something like this: {% for item in thingy.foo %} {% assign thingy.foo[forloop.index0] = site.data.lookups[item] | default: item %} {% endfor %} What I am doing do the item is a bit irrelevant, the part I'm having issues with is updating the item in the array. The code compiles and runs

knitr chunk in footnote with jekyll

我是研究僧i 提交于 2021-02-08 06:22:16
问题 In the kramdown markdown documentation I read that I can insert multi line footnotes by indenting the next lines in the footnote. I tried to insert a knitr chunk into the footnote like this: --- title: "test" output: html_document layout: post --- My text[^1] [^1]:This should appear in a footnote: ```{r} runif(1:10) ``` This worked when compiling the footnote directly with knitr: If I let jekyll compile it it looks differently: The code chunk is not really in the footnote. It is above it. And

Which folder should I put my static files in Jekyll?

只谈情不闲聊 提交于 2021-02-07 05:33:32
问题 While I am looking the doc. I saw the following document structure, . ├── _config.yml ├── _drafts | ├── begin-with-the-crazy-ideas.textile | └── on-simplicity-in-technology.markdown ├── _includes | ├── footer.html | └── header.html ├── _layouts | ├── default.html | └── post.html ├── _posts | ├── 2007-10-29-why-every-programmer-should-play-nethack.textile | └── 2009-04-26-barcamp-boston-4-roundup.textile ├── _data | └── members.yml ├── _site ├── .jekyll-metadata └── index.html When I need to

Which folder should I put my static files in Jekyll?

*爱你&永不变心* 提交于 2021-02-07 05:33:27
问题 While I am looking the doc. I saw the following document structure, . ├── _config.yml ├── _drafts | ├── begin-with-the-crazy-ideas.textile | └── on-simplicity-in-technology.markdown ├── _includes | ├── footer.html | └── header.html ├── _layouts | ├── default.html | └── post.html ├── _posts | ├── 2007-10-29-why-every-programmer-should-play-nethack.textile | └── 2009-04-26-barcamp-boston-4-roundup.textile ├── _data | └── members.yml ├── _site ├── .jekyll-metadata └── index.html When I need to

key for name of json file (rather than just its fields) for use in Jekyll page generator?

别等时光非礼了梦想. 提交于 2021-01-29 20:11:04
问题 I'm using a data page generator for my Jekyll website to create pages based on a folder of JSON files. I want the generator to use the names of the json files as the page title, but I can't figure out the right syntax to tell it to use the file name instead of one of the fields in the json. I can access the file name in one of the layout pages with: for file in site.data.drinks file[0] But file[0] doesn't work in the config (neither does record[0] or record): - data: drinks template: drink