Jekyll

Get the difference in days between two dates in Jekyll

风格不统一 提交于 2020-01-01 05:41:15
问题 I would like to get the difference in days between two dates in Jekyll. How can I achieve this? {% capture currentDate %}{{ site.time | date: '%Y-%m-%d' }}{% endcapture %} {{currentDate}} {% capture event_date %}{{ entry.date }}{% endcapture %} {% if event_date < currentDate %}Yes{% else %}No{% endif %} In the entry there is my YAML: --- title: ChartLine C3 type: charts description: Chart with round for prisma id: c3-1 date: 2015-07-18 --- 回答1: If all you want to do is know whether a date

How do I push jekyll _site directory to gh-pages branch, and leave the source in master?

扶醉桌前 提交于 2020-01-01 04:21:29
问题 I have a basic jekyll site consisting of pages (not posts) but, because I wanted to sort the pages when I listed them, I had to use the Jekyll-Sort plugin (kinda weird sorting pages is not built in to jekyll). Because I'm using a plugin, I can't leverage GitHub's auto jekylling. So I'd like to push the source code of the project to the master branch and just the _site directory to the gh-pages branch. I can't figure out how to do this - I tried adding a git repo inside the _site directory to

Intergrating Static Site generators with php

孤街浪徒 提交于 2020-01-01 03:27:44
问题 I'm currently building a website using php that won't need regular updating and I thought of using static site generators as it will have a blog like feature. However my website contains a form the will link with a database and the problem i'm having is that the static site generators don't recognize and parse php. I am currently considering using one of three static site generators -Jekyll -wintersmith - Piecrust I was wondering if this can be done or are static site generators just for

Jekyll compiling seems WAY too slow

ぐ巨炮叔叔 提交于 2020-01-01 01:17:10
问题 I'm building a site with Jekyll for the first time. I'm loving it so far; my only problem is the exceedingly long build times. Right now, when I run jekyll build , it takes about 30 seconds to generate the site. 30 seconds might not seem like a lot, but at the moment, the entire site only has ONE post, 8 includes, 8 layouts, and 2 small plugins . I haven't abused liquid tags to my knowledge, and if I remove the plugins, it still takes just as long. When searching for an answer, all I can find

Configuring Jekyll for github PROJECT pages

╄→尐↘猪︶ㄣ 提交于 2019-12-31 10:33:42
问题 I am at my wits end here. I've been trying to look at all other example github project pages I could find and even the blogs but none exhibit the problems I am getting. First, I am trying to create a project page for my repo. I did this by following the usual tutorials, creating a gh-pages branch in my project repo and pushing. I managed to do these and template my files. I even managed to use HAML and SASS(they still both get converted to html/css and that's what I push to the repo so no

Configuring Jekyll for github PROJECT pages

时光毁灭记忆、已成空白 提交于 2019-12-31 10:33:27
问题 I am at my wits end here. I've been trying to look at all other example github project pages I could find and even the blogs but none exhibit the problems I am getting. First, I am trying to create a project page for my repo. I did this by following the usual tutorials, creating a gh-pages branch in my project repo and pushing. I managed to do these and template my files. I even managed to use HAML and SASS(they still both get converted to html/css and that's what I push to the repo so no

Deploying Jekyll to Github Pages

眉间皱痕 提交于 2019-12-31 09:26:21
问题 I have built a site locally with Jekyll, and have pushed it to a new master repo (username.github.com) and the site works great yay. My question is, how do I move just the deployable part, the _ site directory, into a gh-pages branch? Or rather, the contents of that directory if that is the best way to deploy? I plan on using a custom domain. My workflow will be to work in the master branch, maybe some feature branches, and then push (merge) the compiled outcome into the gh-pages branch. Does

Deploying Jekyll to Github Pages

99封情书 提交于 2019-12-31 09:25:02
问题 I have built a site locally with Jekyll, and have pushed it to a new master repo (username.github.com) and the site works great yay. My question is, how do I move just the deployable part, the _ site directory, into a gh-pages branch? Or rather, the contents of that directory if that is the best way to deploy? I plan on using a custom domain. My workflow will be to work in the master branch, maybe some feature branches, and then push (merge) the compiled outcome into the gh-pages branch. Does

How to adjust Jekyll post order?

痞子三分冷 提交于 2019-12-31 08:56:25
问题 I have started a Jekyll based blog with a theme jekyll-now. I am new to Jekyll and how it operates (especially Liquid). I understand that new posts need to be as follows: 2014-10-04-Hello-World.md. But I really don't understand how I could order these. My first thought is that they order by date so two posts on the same date would order randomly. But is this not the case? Is there a way of ordering posts chronologically. OR at least having a post archive page? 回答1: There is an example in the

Docker bound mount - can not see changes on browser

心不动则不痛 提交于 2019-12-31 02:52:28
问题 I'm using docker-toolbox on windows home. I was able to run a jekyll-serve web server image to see the default page on browser, but when I try to edit file on VS Code, I can not see the changes after refreshing the browser. Any idea why I can not see the changes after refresh? Step to reproduce: First I've git cloned this repository into my c:/Users/shaharshokrani/udemy-docker-mastery/bind-mount-sample1 (I'm able to see the files with ls on 'cmder' console). Then I was able to run this image