Skip to content

Commit

Permalink
[feat] multilingual setting
Browse files Browse the repository at this point in the history
  • Loading branch information
limJhyeok committed Nov 4, 2024
1 parent f612956 commit 6ee47fd
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 18 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source "https://rubygems.org"
gemspec
gem 'jekyll-polyglot', git: 'https://github.com/hionpu/polyglot', branch: 'master'
8 changes: 7 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jekyll-include-cache
- jekyll-polyglot

# mimic GitHub Pages with --safe
whitelist:
Expand Down Expand Up @@ -324,4 +325,9 @@ defaults:
share: true
related: true
sidebar:
nav: "sidebar-category"
nav: "sidebar-category"

languages: ["ko", "en"]
default_lang: "ko"
exclude_from_localization: ["images", "javascripts"]
parallel_localization: true
2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}

{% I18n_Headers %}
23 changes: 11 additions & 12 deletions _includes/masthead.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@
<ul class="visible-links">
{%- for link in site.data.navigation.main -%}
<li class="masthead__menu-item">
<a
href="{{ link.url | relative_url }}"
{% if link.description %} title="{{ link.description }}"{% endif %}
{% if link.target %} target="{{ link.target }}"{% endif %}
>{{ link.title }}</a>
<a href="{{ link.url | relative_url }}"{% if link.description %} title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
</li>
{%- endfor -%}
<!-- 언어 선택 메뉴 추가 -->
{% for lang in site.languages %}
<li class="masthead__menu-item">
<a href="{% if lang == site.default_lang %}{{ site.url }}{% else %}{{ site.url }}/{{ lang }}{% endif %}"
{% if lang == site.active_lang %}style="font-weight: bold;"{% endif %}>
{{ lang | upcase }}
</a>
</li>
{% endfor %}
</ul>
{% if site.search == true %}
<button class="search__toggle" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span>
<i class="fas fa-search"></i>
</button>
{% endif %}
<button class="greedy-nav__toggle hidden" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
<div class="navicon"></div>
Expand All @@ -36,4 +35,4 @@
</nav>
</div>
</div>
</div>
</div>
5 changes: 0 additions & 5 deletions _posts/2024-11-03-first.md

This file was deleted.

45 changes: 45 additions & 0 deletions _posts/en/set_up/2024-11-03-gpu-cloud-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "GPU cloud setting(paperspace, vast.ai)"
excerpt: "How to set up GPU cloud using papersapce or vast.ai"
lang: en
lang-ref: gpu-cloud-setup
permalink: set_up/gpu-cloud-setup/
categories:
- set_up
tags:
- GPU server
- GPU cloud
- GPU VM
- GPU docker container
- GPU setting

toc_label: "목차" # 목차 제목을 원하는 대로 설정
toc: true # 목차 활성화
toc_sticky: true # 스크롤 시 목차 고정

author: "limJhyeok" # 포스트 작성자 이름
image: "/assets/images/gpu-cloud-setup.jpg" # 포스트 대표 이미지 경로
share: true # 소셜 미디어 공유 버튼 활성화
comments: true # 댓글 기능 활성화
related:
- "기타 GPU 클라우드 관련 포스트" # 관련 포스트 제목
- "GPU 서버 최적화 방법"

date: 2024-11-03
last_modified_at: 2022-11-03
redirect_from:
- /old-gpu-cloud-post # 이전 포스트에서 리디렉션
---


## 1. GPU 클라우드란?
GPU 클라우드의 개념과 장점에 대해 설명합니다.

## 2. Paperspace 설정하기
Paperspace를 설정하는 단계별 가이드를 제공합니다.

### 2.1. Paperspace 계정 생성
계정을 만드는 방법을 설명합니다.

## 3. Vast.ai 설정하기
Vast.ai의 설정 방법을 안내합니다.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "GPU 클라우드 셋팅(paperspace, vast.ai)"
excerpt: "paperspace와 vast.ai를 이용하여 GPU 클라우드 셋팅하는 방법을 설명합니다."
lang: ko
lang-ref: gpu-cloud-setup
permalink: /set_up/gpu-cloud-setup/
categories:
- set_up
tags:
Expand Down
33 changes: 33 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout:
---

{% comment %}<!-- I am using hreflang attributes on a page-by-page basis so no need to include them per url here -->{% endcomment %}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{% for lang in site.languages %}

{% comment %}<!-- It would be better to use the where_exp filter in the first loop but I dont think the unless expression is supported -->{% endcomment %}
{% for node in site.pages %}
{% comment %}<!-- very lazy check to see if page is in the exclude list - this means excluded pages are not gonna be in the sitemap at all, write exceptions as necessary -->{% endcomment %}
{% unless site.exclude_from_localization contains node.path %}
{% comment %}<!-- I am assuming if there's not layout assigned, then not include the page in the sitemap, you may want to change this -->{% endcomment %}
{% if node.layout %}
<url>
<loc>{% if lang == site.default_lang %}{{ node.url | absolute_url }}{% else %}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{% endif %}</loc>
</url>
{% endif %}
{% endunless %}
{% endfor %}

{% comment %}<!-- This loops through all site collections including posts -->{% endcomment %}
{% for collection in site.collections %}
{% for node in site[collection.label] %}
<url>
<loc>{% if lang == site.default_lang %}{{ node.url | absolute_url }}{% else %}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{% endif %}</loc>
</url>
{% endfor %}
{% endfor %}

{% endfor %}
</urlset>

0 comments on commit 6ee47fd

Please sign in to comment.