mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2026-11-07 12:35:58 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50455b3d24 | ||
|
|
5f623d4c4d |
No files matched your search
@@ -80,7 +80,7 @@ jobs:
|
||||
needs: [submodule, metadata]
|
||||
strategy:
|
||||
matrix:
|
||||
lang: [es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||
lang: [es, fr, he, it, ko, nl, ru, zh-Hant, zh-TW]
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
|
||||
@@ -424,7 +424,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
|
||||
lang: [en, es, fr, he, it, kr, nl, ru, zh-Hant]
|
||||
|
||||
steps:
|
||||
- name: Add GitHub Token to Environment
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
needs: submodule
|
||||
strategy:
|
||||
matrix:
|
||||
lang: [en, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||
lang: [en, es, fr, he, it, ko, nl, ru, zh-Hant, zh-TW]
|
||||
build: [build]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
+7
-3
@@ -189,6 +189,10 @@ extra:
|
||||
link: /it/
|
||||
lang: it
|
||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1ee-1f1f9.svg
|
||||
- name: 한국어
|
||||
link: /ko/
|
||||
lang: ko
|
||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f0-1f1f7.svg
|
||||
- name: Nederlands
|
||||
link: /nl/
|
||||
lang: nl
|
||||
@@ -313,7 +317,7 @@ markdown_extensions:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
pymdownx.arithmatex:
|
||||
@@ -334,8 +338,8 @@ markdown_extensions:
|
||||
meta: {}
|
||||
abbr: {}
|
||||
pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
options:
|
||||
custom_icons:
|
||||
- theme/icons
|
||||
|
||||
@@ -31,45 +31,44 @@ insiders=false
|
||||
export PRODUCTION=false
|
||||
|
||||
# Parse command-line arguments
|
||||
for arg in "$@"
|
||||
do
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--lang=*)
|
||||
--lang=*)
|
||||
language="${arg#*=}"
|
||||
shift
|
||||
;;
|
||||
--insiders)
|
||||
--insiders)
|
||||
insiders=true
|
||||
shift
|
||||
;;
|
||||
--cmd=*)
|
||||
--cmd=*)
|
||||
base_cmd="${arg#*=}"
|
||||
shift
|
||||
;;
|
||||
--build)
|
||||
--build)
|
||||
build=true
|
||||
shift
|
||||
;;
|
||||
--offline)
|
||||
--offline)
|
||||
offline=true
|
||||
shift
|
||||
;;
|
||||
--production)
|
||||
--production)
|
||||
export PRODUCTION=true
|
||||
shift
|
||||
;;
|
||||
--cmd_flags=*)
|
||||
--cmd_flags=*)
|
||||
cmd_flags+=("${arg#*=}")
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Set variables for offline mode
|
||||
if $offline ; then
|
||||
if $offline; then
|
||||
export BUILD_EDIT_URI_TEMPLATE=''
|
||||
export BUILD_OFFLINE=true
|
||||
export BUILD_REPO_URL=''
|
||||
@@ -90,8 +89,8 @@ fi
|
||||
|
||||
# Source per-language strings
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "$PWD/includes/strings.$language.env"
|
||||
# shellcheck disable=SC1090
|
||||
source "$PWD/includes/strings.$language.env"
|
||||
set +a
|
||||
|
||||
# Set font if hebrew
|
||||
@@ -100,6 +99,12 @@ if [ "$language" == "he" ]; then
|
||||
export BUILD_THEME_FONT_TEXT="Open Sans"
|
||||
fi
|
||||
|
||||
# Set font if Korean
|
||||
if [ "$language" == "ko" ]; then
|
||||
export BUILD_THEME_FONT_CODE="Noto Sans KR"
|
||||
export BUILD_THEME_FONT_TEXT="Noto Sans KR"
|
||||
fi
|
||||
|
||||
# Set font if russian or chinese
|
||||
if [[ "ru zh-Hant zh-TW" =~ $language ]]; then
|
||||
export BUILD_THEME_FONT_CODE="Noto Sans TC"
|
||||
@@ -107,18 +112,18 @@ if [[ "ru zh-Hant zh-TW" =~ $language ]]; then
|
||||
fi
|
||||
|
||||
# Set stylesheet if hebrew or russian or chinese
|
||||
if [[ "he ru zh-Hant zh-TW" =~ $language ]]; then
|
||||
if [[ "he ko ru zh-Hant zh-TW" =~ $language ]]; then
|
||||
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
|
||||
fi
|
||||
|
||||
# Set theme if insiders
|
||||
if $insiders ; then
|
||||
if $insiders; then
|
||||
export BUILD_INSIDERS=true
|
||||
cmd_flags+=("--config-file=$PWD/mkdocs.insiders.yml")
|
||||
fi
|
||||
|
||||
# Run the command with the specified language
|
||||
if $build ; then
|
||||
if $build; then
|
||||
$base_cmd build "${cmd_flags[@]}"
|
||||
else
|
||||
$base_cmd serve "${cmd_flags[@]}"
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
/// Copyright (c) 2026 Jonah Aragon <jonah@triplebit.net>
|
||||
///
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
/// copy of this software and associated documentation files (the "Software"),
|
||||
/// to deal in the Software without restriction, including without limitation
|
||||
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
/// and/or sell copies of the Software, and to permit persons to whom the
|
||||
/// Software is furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
/// DEALINGS
|
||||
*/
|
||||
|
||||
/* korean */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif KR';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-korean-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-korean-400-normal.woff) format('woff');
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif KR';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-latin-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-latin-400-normal.woff) format('woff');
|
||||
}
|
||||
|
||||
/* korean */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif KR';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-korean-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-korean-700-normal.woff) format('woff');
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif KR';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-latin-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-kr/files/noto-serif-kr-latin-700-normal.woff) format('woff');
|
||||
}
|
||||
|
||||
h1, h2, h3, .md-header__topic {
|
||||
font-family: "Bagnard", "Noto Serif KR", serif;
|
||||
font-weight: 700!important;
|
||||
}
|
||||
@@ -11,6 +11,8 @@ definitions:
|
||||
- &font_family >-
|
||||
{%- if config.theme.language == "he" -%}
|
||||
Suez One
|
||||
{%- elif config.theme.language == "ko" -%}
|
||||
Noto Sans KR
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Sans TC
|
||||
{%- else -%}
|
||||
|
||||
@@ -21,6 +21,8 @@ definitions:
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Serif TC
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- else -%}
|
||||
Bagnard
|
||||
{%- endif -%}
|
||||
@@ -37,6 +39,8 @@ definitions:
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Sans TC
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- else -%}
|
||||
Public Sans
|
||||
{%- endif -%}
|
||||
|
||||
@@ -17,6 +17,8 @@ definitions:
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Serif TC
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- else -%}
|
||||
Bagnard
|
||||
{%- endif -%}
|
||||
@@ -26,6 +28,8 @@ definitions:
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Sans TC
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- else -%}
|
||||
Public Sans
|
||||
{%- endif -%}
|
||||
|
||||
@@ -19,6 +19,8 @@ definitions:
|
||||
- &title_font_family >-
|
||||
{%- if config.theme.language == "he" -%}
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Serif TC
|
||||
{%- else -%}
|
||||
@@ -37,6 +39,8 @@ definitions:
|
||||
Suez One
|
||||
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||
Noto Sans TC
|
||||
{%- elif config.theme.language == ("ko") -%}
|
||||
Noto Serif KR
|
||||
{%- else -%}
|
||||
Public Sans
|
||||
{%- endif -%}
|
||||
|
||||
Reference in new issue
Block a user