Jekyll 로컬 설치 구성
Git 설치
- https://git-scm.com/downloads
Ruby 설치
- https://rubyinstaller.org/
Theme 설치
gem install jekyll-theme-cayman
bundle install
bundle update
jeklyll start
jekyll serve
Blog Listings by Year
- /index.md
{% capture pre_year %}{{ "1900" }}{% endcapture %}
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% if this_year != pre_year %}
## {{ this_year }}
{% capture pre_year %}{{ this_year }}{% endcapture %}
{% endif %}
[[{{ post.date | date: "%Y-%m-%d (%a)" }}] {{ post.title }}]({{ post.url }})
{% endfor %}
Redirect setting
- _layout/redirect.html
<!DOCTYPE html>
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;url={{ page.redirect_url }}" />
</head>
<body>
<h1>Redirecting...</h1>
<a href="{{ page.redirect_url }}">Click here if you are not redirected.<a>
<script>location='{{ page.redirect_url }}'</script>
</body>
</html>
- *.md
---
layout: "redirect"
redirect_url: "/web/blog/1"
---