Skip to content

Commit 0db9473

Browse files
committed
attempt to fix
1 parent 0a6e2e2 commit 0db9473

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

config.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ taxonomies = [
1212
[translations]
1313
tags = "Tags"
1414
categories = "Categories"
15+
url = "$BASE_URL"
16+
name = "eng"
1517

1618
[languages.kor]
1719
generate_feed = true
@@ -24,6 +26,8 @@ taxonomies = [
2426
[languages.kor.translations]
2527
tags = "태그"
2628
categories = "범주"
29+
url = "$BASE_URL/kor"
30+
name = "kor"
2731

2832
[extra]
2933
author = "Vincent"
@@ -32,8 +36,4 @@ after_dark_menu = [
3236
{url = "$LANG_BASE_URL/categories", trans_key = "categories"},
3337
{url = "$LANG_BASE_URL/tags", trans_key = "tags"},
3438
]
35-
after_dark_langs = [
36-
{url = "$BASE_URL", name = "eng"},
37-
{url = "$BASE_URL/kor", name = "kor"},
38-
]
3939
after_dark_title = "My blog"

templates/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
{% set lang_base_url = get_url(path="", lang=lang) %}
3838
{% block content %}
3939
{% block header %}
40-
{% if config.extra.after_dark_menu or config.extra.after_dark_langs %}
40+
{% if config.extra.after_dark_menu or config.translations %}
4141
<header>
4242
<nav itemscope itemtype="http://schema.org/SiteNavigationElement">
43-
{% if config.extra.after_dark_langs %}
43+
{% if config.translations %}
4444
<div style="float: right">
45-
{% for item in config.extra.after_dark_langs %}
45+
{% for item in config.translations %}
4646
<a itemprop="url"
4747
class="navbar {% if item.url | replace(from="$BASE_URL", to=config.base_url) | replace(from="$LANG_BASE_URL", to=lang_base_url) == current_url %}active{% endif %}"
4848
href="{{ item.url | safe | replace(from="$BASE_URL", to=config.base_url) | replace(from="$LANG_BASE_URL", to=lang_base_url) }}">

0 commit comments

Comments
 (0)