Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _data/origin/cors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cdns:

# fonts

webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;900&display=swap
webfonts: https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap

# Libraries

Expand Down
37 changes: 37 additions & 0 deletions _includes/author-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- Author profile shown at the end of a post -->

{% assign intro = site.data.about.intro %}

<section class="author-card" aria-label="작성자">
{% if site.avatar %}
<img
class="author-card-avatar"
src="{{ site.avatar | relative_url }}"
alt="{{ site.social.name }}"
width="56"
height="56"
>
{% endif %}

<div class="author-card-body">
<p class="author-card-name">
<a href="{{ '/about/' | relative_url }}">{{ intro.name | default: site.social.name }}</a>
</p>
{% if intro.headline %}
<p class="author-card-desc">{{ intro.headline }}</p>
{% endif %}

<div class="author-card-links">
<a href="{{ '/about/' | relative_url }}">About</a>
{% for link in intro.links %}
{% unless link.url contains 'mailto:' %}
<a
href="{{ link.url | relative_url }}"
{% if link.url contains '://' %}target="_blank" rel="noopener noreferrer"{% endif %}
>{{ link.name }}</a
>
{% endunless %}
{% endfor %}
</div>
</div>
</section>
1 change: 1 addition & 0 deletions _includes/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<{{ wrap_elem }}
class="{% if include.class %}{{ include.class }}{% endif %}"
{% if wrap_elem == 'time' %}datetime="{{ include.date | date_to_xmlschema }}"{% endif %}
data-ts="{{ include.date | date: '%s' }}"
data-df="{{ df_dayjs }}"
{% if include.tooltip %}
Expand Down
4 changes: 4 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
href="{{ site.data.origin[type].fontawesome.css | relative_url }}"
/>

<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css"
/>
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}" />

{% if site.toc and page.toc %}
Expand Down
87 changes: 68 additions & 19 deletions _includes/metadata-hook.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{% assign intro = site.data.about.intro %}
{% capture person_id %}{{ '/about/' | absolute_url }}#person{% endcapture %}
{% capture person_json %}
{
"@type": "Person",
"@id": "{{ person_id }}",
"name": "{{ site.social.name }}",
"alternateName": {{ intro.name | default: site.social.name | jsonify }},
"url": "{{ '/about/' | absolute_url }}",
{% if intro.headline %}"description": {{ intro.headline | jsonify }},{% endif %}
"sameAs": {{ site.social.links | jsonify }}
}
{% endcapture %}

<!-- Structured Data: BlogPosting Schema -->
{% if page.layout == 'post' %}
<script type="application/ld+json">
Expand All @@ -12,19 +26,23 @@
"description": {{ page.description | default: page.excerpt | strip_html | truncate: 160 | jsonify }},
"datePublished": "{{ page.date | date_to_xmlschema }}",
"dateModified": "{{ page.last_modified_at | default: page.lastmod | default: page.date | date_to_xmlschema }}",
"author": {
"@type": "Person",
"name": "{{ site.social.name }}",
"url": "{{ site.social.links[0] }}"
},
"url": "{{ page.url | absolute_url }}",
"author": {{ person_json | strip }},
"publisher": {
"@type": "Organization",
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"logo": {
"@type": "ImageObject",
"url": "{{ '/assets/img/favicons/favicon-96x96.png' | absolute_url }}"
}
},
"isPartOf": {
"@type": "Blog",
"@id": "{{ site.url }}/#blog",
"name": "{{ site.title }}"
},
{% if page.categories.size > 0 %}"articleSection": {{ page.categories | jsonify }},{% endif %}
"wordCount": "{{ page.content | number_of_words }}",
"inLanguage": "{{ site.lang | default: 'ko-KR' }}"
{% if page.image %},
Expand Down Expand Up @@ -74,24 +92,55 @@
</script>
{% endif %}

<!-- Structured Data: WebSite (for sitelinks search box) -->
<!-- Structured Data: WebSite & Blog -->
{% if page.layout == 'home' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"description": {{ site.description | jsonify }},
"author": {
"@type": "Person",
"name": "{{ site.social.name }}"
},
"potentialAction": {
"@type": "SearchAction",
"target": "{{ site.url }}/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
"@graph": [
{
"@type": "WebSite",
"@id": "{{ site.url }}/#website",
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"description": {{ site.description | jsonify }},
"inLanguage": "{{ site.lang | default: 'ko-KR' }}",
"author": { "@id": "{{ person_id }}" }
},
{
"@type": "Blog",
"@id": "{{ site.url }}/#blog",
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"description": {{ site.description | jsonify }},
"inLanguage": "{{ site.lang | default: 'ko-KR' }}",
"author": { "@id": "{{ person_id }}" },
"blogPost": [
{% for post in site.posts limit: 10 %}
{
"@type": "BlogPosting",
"headline": {{ post.title | jsonify }},
"url": "{{ post.url | absolute_url }}",
"datePublished": "{{ post.date | date_to_xmlschema }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
},
{{ person_json | strip }}
]
}
</script>
{% endif %}

<!-- Structured Data: ProfilePage -->
{% if page.url == '/about/' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ProfilePage",
"url": "{{ page.url | absolute_url }}",
"inLanguage": "{{ site.lang | default: 'ko-KR' }}",
"mainEntity": {{ person_json | strip }}
}
</script>
{% endif %}
42 changes: 42 additions & 0 deletions _includes/post-list-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!-- A post row shared by the home, category and tag lists. Requires `include.post`. -->

{% assign post = include.post %}

<article class="post-item">
<a href="{{ post.url | relative_url }}" class="post-item-link">
<div class="post-item-body">
{% if include.show_category and post.categories.size > 0 %}
<span class="post-item-category">{{ post.categories | first }}</span>
{% endif %}

<h2 class="post-item-title">
{% if post.pin %}<i class="fas fa-thumbtack fa-xs me-1" aria-label="{{ site.data.locales[include.lang].post.pin_prompt }}"></i>{% endif %}
{{ post.title }}
</h2>

<p class="post-item-excerpt">
{% if post.description %}
{{ post.description | strip_html | truncate: 160 | escape }}
{% else %}
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 160 | escape }}
{% endif %}
</p>

<div class="post-item-meta">
{% include datetime.html date=post.date lang=include.lang wrap='time' %}
{% include read-time.html content=post.content lang=include.lang %}
</div>
</div>

{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}
<div class="post-item-thumb">
<img src="{{ src }}" alt="{{ post.image.alt | default: post.title | escape }}" loading="lazy">
</div>
{% endif %}
</a>
</article>
38 changes: 11 additions & 27 deletions _includes/post-nav.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
<!-- Navigation buttons at the bottom of the post. -->
<!-- Navigation links at the bottom of the post. -->

<div class="post-navigation d-flex justify-content-between">
<nav class="post-navigation" aria-label="이전 글과 다음 글">
{% if page.previous.url %}
<a
href="{{ site.baseurl }}{{ page.previous.url }}"
class="btn btn-outline-primary"
prompt="{{ site.data.locales[include.lang].post.button.previous }}"
>
<p>{{ page.previous.title }}</p>
<a href="{{ page.previous.url | relative_url }}" class="post-nav-item post-nav-prev" rel="prev">
<span class="post-nav-label"><i class="fas fa-arrow-left fa-xs"></i> {{ site.data.locales[include.lang].post.button.previous }}</span>
<span class="post-nav-title">{{ page.previous.title }}</span>
</a>
{% else %}
<div
class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[include.lang].post.button.previous }}"
>
<p>-</p>
</div>
<span class="post-nav-item post-nav-empty"></span>
{% endif %}

{% if page.next.url %}
<a
href="{{ site.baseurl }}{{page.next.url}}"
class="btn btn-outline-primary"
prompt="{{ site.data.locales[include.lang].post.button.next }}"
>
<p>{{ page.next.title }}</p>
<a href="{{ page.next.url | relative_url }}" class="post-nav-item post-nav-next" rel="next">
<span class="post-nav-label">{{ site.data.locales[include.lang].post.button.next }} <i class="fas fa-arrow-right fa-xs"></i></span>
<span class="post-nav-title">{{ page.next.title }}</span>
</a>
{% else %}
<div
class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[include.lang].post.button.next }}"
>
<p>-</p>
</div>
<span class="post-nav-item post-nav-empty"></span>
{% endif %}
</div>
</nav>
40 changes: 19 additions & 21 deletions _includes/related-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,29 @@
{% include ads/multiplex.html %}

{% if index_list.size > 0 %}
<div id="related-posts" class="mb-2 mb-sm-4">
<h3 class="pt-2 mb-4 ms-1" data-toc-skip>
<section id="related-posts" aria-labelledby="related-posts-title">
<h2 class="related-posts-title" id="related-posts-title" data-toc-skip>
{{ site.data.locales[include.lang].post.relate_posts }}
</h3>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4">
</h2>
<ul class="related-list">
{% for entry in index_list %} {% assign index = entry | plus: 0 %} {% assign
post = site.posts[index] %}
<div class="col">
<a href="{{ post.url | relative_url }}" class="card post-preview h-100">
<div class="card-body">
{% include datetime.html date=post.date class="small"
lang=include.lang %}
<h4 class="pt-0 my-2" data-toc-skip>{{ post.title }}</h4>
<div class="text-muted small">
<p>
{% include no-linenos.html content=post.content %} {{ content |
markdownify | strip_html | truncate: 200 | escape }}
</p>
</div>
</div>
<li>
<a href="{{ post.url | relative_url }}" class="related-item">
<span class="related-item-title">{{ post.title }}</span>
<span class="related-item-excerpt">
{% if post.description %}
{{ post.description | strip_html | truncate: 120 | escape }}
{% else %}
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 120 | escape }}
{% endif %}
</span>
{% include datetime.html date=post.date class="related-item-date" lang=include.lang wrap='time' %}
</a>
</div>
</li>
{% endfor %}
</div>
<!-- .card-deck -->
</div>
</ul>
</section>
<!-- #related-posts -->
{% endif %}
Loading
Loading