Skip to content

Commit

Permalink
actually tested this
Browse files Browse the repository at this point in the history
  • Loading branch information
eerussianguy committed Oct 4, 2024
1 parent 4dc90c0 commit 1e4ae03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions assets/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"title": "TerraFirmaCraft Field Guide",
"short_title": "TFC Field Guide",
"index": "Index",
"contents": "Contents",
"version": "Version",
Expand Down
2 changes: 1 addition & 1 deletion assets/templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta property="og:url" content="https://terrafirmacraft.github.io/Field-Guide" />
<meta property="og:title" content="{long_title}" />
<meta property="og:description" content="{short_description}" />
<meta property="og:image" content="https://terrafirmacraft.github.io/Field-Guide/_images/{preview_image}".replace('../../_images/', '') />
<meta property="og:image" content="https://terrafirmacraft.github.io/Field-Guide/_images/{preview_image}" />

<title>{long_title}</title>

Expand Down
1 change: 1 addition & 0 deletions src/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def key(text: str) -> str:

class I18n:
TITLE = key('title')
SHORT_TITLE = key('short_title')
INDEX = key('index')
CONTENTS = key('contents')
VERSION = key('version')
Expand Down
10 changes: 5 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def build_book_html(context: Context):
title=context.translate(I18n.TITLE),
long_title=context.translate(I18n.TITLE) + " | " + versions.MC_VERSION,
short_description=context.translate(I18n.HOME),
preview_image=get_splash_location(),
preview_image=get_splash_location().replace('..\\..\\_images\\', ''),
text_index=context.translate(I18n.INDEX),
text_contents=context.translate(I18n.CONTENTS),
text_version=context.translate(I18n.VERSION),
Expand Down Expand Up @@ -461,9 +461,9 @@ def build_book_html(context: Context):
for category_id, cat in context.sorted_categories:
util.write_html(context.output_dir, category_id, 'index.html', html=TEMPLATE.format(
title=context.translate(I18n.TITLE),
long_title=cat.name + " | " + context.translate(I18n.TITLE),
long_title=cat.name + " | " + context.translate(I18n.SHORT_TITLE),
short_description=cat.name,
preview_image=get_splash_location(),
preview_image=get_splash_location().replace('..\\..\\_images\\', ''),
text_index=context.translate(I18n.INDEX),
text_contents=context.translate(I18n.CONTENTS),
text_version=context.translate(I18n.VERSION),
Expand Down Expand Up @@ -520,9 +520,9 @@ def build_book_html(context: Context):
for entry_id, entry in cat.sorted_entries:
util.write_html(context.output_dir, entry_id + '.html', html=TEMPLATE.format(
title=context.translate(I18n.TITLE),
long_title=entry.name + " | " + cat.name + " | " + context.translate(I18n.TITLE),
long_title=entry.name + " | " + cat.name + " | " + context.translate(I18n.SHORT_TITLE),
short_description=entry.name,
preview_image=entry.icon,
preview_image=entry.icon.replace('..\\..\\_images\\', ''),
text_index=context.translate(I18n.INDEX),
text_contents=context.translate(I18n.CONTENTS),
text_version=context.translate(I18n.VERSION),
Expand Down

0 comments on commit 1e4ae03

Please sign in to comment.