mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf: add I18n support for echarts and timeline data param
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.20-0cf0d4f4" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.20-d1d3ed29" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<template data-fmt="js" data-async="{{ $async }}">{{ $content | safeJS }}</template>
|
||||
{{- else -}}
|
||||
{{ with $data }}
|
||||
{{- $content = index site.Data.echarts . -}}
|
||||
{{- $content = index site.Data.echarts (printf "%v.%v" . page.Language) | default (index site.Data.echarts .) -}}
|
||||
{{- if not $content -}}
|
||||
{{- warnf "ECharts: data not found, please ensure the data file \"data/echarts/%s.{json|yml|yaml|toml}\" exists." . -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- /* Get Timeline events */ -}}
|
||||
{{- $content := .Inner -}}
|
||||
{{ with $data }}
|
||||
{{- $content = index site.Data.timeline . -}}
|
||||
{{- $content = index site.Data.timeline (printf "%v.%v" . page.Language) | default (index site.Data.timeline .) -}}
|
||||
{{- if not $content -}}
|
||||
{{- warnf "Timeline: data not found, please ensure the data file \"data/timeline/%s.{json|yml|yaml|toml}\" exists." . -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user