github-pages
๋ก ์
๋ฐ์ดํธํ์ต๋๋ค.์ปดํ์ผํ๋ ๋์ ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ๊ณ ๊ฐ ํ์๋ฉ๋๋ค. ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ด๋ป๊ฒ ํด์ผ ํ๋์?
Liquid Warning: Liquid syntax error (line 5): Expected id but found open_square in "item in site.[item.label]" in feeds/feed.json
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
Liquid Warning: Liquid syntax error (line 19): Expected id but found open_square in "post in site.categories.[page.category]" in /_layouts/category.html
category.html
<h1 class="title">{{ page.title }}</h1>
{% unless page.content == '' %}
<p>{{ page.content }}</p>
{% endunless %}
<ul id="blog-posts" class="posts">
{% for post in site.categories.[page.category] %}
<li><span>{{ post.date | date: "%d/%m/%Y" }} »</span><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
feed.json
{% assign first = true %}
[
{% for collection in site.collections %}
{% for item in collection %}
{% for item in site.[item.label] %}
{% if item.title != null and item.title != empty %}
{% unless first %},{% endunless %}{
"title": {{item.title | jsonify}},
"content": {{item.content | markdownify | strip_html | jsonify}},
"link": "{{ site.baseurl }}{{ item.url }}",
"date": "{{ item.date }}",
"excerpt": "{{ item.snippet }}",
"search_omit": "{{ item.search_omit }}"
}
{% assign first = false %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% for post in site.posts %}
{% if post.title != null and post.title != empty %}
{% unless first %},{% endunless %}{
"title": {{post.title | jsonify}},
"content": {{post.content | markdownify | strip_html | jsonify}},
"link": "{{ site.baseurl }}{{ post.url }}",
"date": "{{ post.date }}",
"excerpt": "{{ post.snippet }}",
"search_omit": "{{ post.search_omit }}"
}
{% assign first = false %}
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.title != null and page.title != empty %}
{% unless first %},{% endunless %}{
"title": {{page.title | jsonify}},
"content": {{page.content | strip_html | jsonify}},
"link": "{{ site.baseurl }}{{ page.url | replace: 'index.html', '' }}",
"date": {{ page.date | jsonify }},
"excerpt": {{ page.description | jsonify }},
"search_omit": "{{ page.search_omit }}"
}
{% assign first = false %}
{% endif %}
{% endfor %}
]
์ด๊ฒ์ ๋ฒ๊ทธ๊ฐ ์๋๋๋ค.
Jekyll ์ฌ์ฉ์ ๋ํ ๋์์ด ํ์ํ๋ฉด https://talk.jekyllrb.com ์ ์ง๋ฌธ์ ๊ฒ์ํ์ธ์.
์ค๋ฅ ๋ฉ์์ง์์ ์ ์ ์๋ฏ์ด site.categories.[page.category]
์(๋) ์ ํจํ์ง ์์ต๋๋ค.
๋๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ค
https://talk.jekyllrb.com/t/liquid-syntax-error/2982/7?u=mertcangokgoz
@MertcanGokgoz ๊ทํ์ ๋งํฌ๋ 404ing์ ๋๋ค. ์๋ฃจ์ ์ ์ ๊ณตํ ์ ์์ต๋๊น?
ํธ์ง: site.tags.[page.tag]
๋ฅผ site.tags[page.tag]
(์ ์ ๊ฑฐ)๋ก ๋ฐ๊ฟ์ผ ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@MertcanGokgoz ๊ทํ์ ๋งํฌ๋ 404ing์ ๋๋ค. ์๋ฃจ์ ์ ์ ๊ณตํ ์ ์์ต๋๊น?
ํธ์ง:
site.tags.[page.tag]
๋ฅผsite.tags[page.tag]
(์ ์ ๊ฑฐ)๋ก ๋ฐ๊ฟ์ผ ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.