mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-09-12 13:08:47 +00:00
Compare commits
1 Commits
2025.09.12
...
add-zh-TW
Author | SHA1 | Date | |
---|---|---|---|
e0a6743af0
|
14
.github/workflows/build-pr.yml
vendored
14
.github/workflows/build-pr.yml
vendored
@@ -80,7 +80,7 @@ jobs:
|
|||||||
needs: [submodule, metadata]
|
needs: [submodule, metadata]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lang: [es, fr, he, it, nl, ru, zh-Hant]
|
lang: [es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
@@ -101,16 +101,6 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
|
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
|
||||||
|
|
||||||
build_zimfile:
|
|
||||||
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:build zimfile') }}
|
|
||||||
needs: [submodule, metadata]
|
|
||||||
uses: ./.github/workflows/build-zimfile.yml
|
|
||||||
with:
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repo: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
secrets:
|
|
||||||
RO_DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
|
||||||
|
|
||||||
combine_build:
|
combine_build:
|
||||||
needs: [build_english, build_i18n, build_blog]
|
needs: [build_english, build_i18n, build_blog]
|
||||||
if: |
|
if: |
|
||||||
@@ -139,5 +129,5 @@ jobs:
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: [build_english, build_i18n, build_blog, build_zimfile]
|
needs: [build_english, build_i18n, build_blog]
|
||||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
||||||
|
603
.github/workflows/build-zimfile.yml
vendored
603
.github/workflows/build-zimfile.yml
vendored
@@ -1,603 +0,0 @@
|
|||||||
name: 🥝 Build Zimfile
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
ref:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
repo:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
secrets:
|
|
||||||
RO_DISCOURSE_API_KEY:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
VIDEOS_SITE_BASE_URL: https://www.privacyguides.org/videos/
|
|
||||||
HOMEPAGE_CTA_ABOUT_LINK: about.html
|
|
||||||
HOMEPAGE_CTA_DONATE_LINK: about/donate.html
|
|
||||||
BUILD_OFFLINE: true
|
|
||||||
PRODUCTION: true
|
|
||||||
CARDS: false
|
|
||||||
GITREVISIONDATE: false
|
|
||||||
GITAUTHORS: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
package_eng:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
LANGUAGE_SWITCHER: false
|
|
||||||
MAIN_SITE_BASE_URL: /en/index.html
|
|
||||||
MAIN_SITE_ABOUT_URL: /en/about.html
|
|
||||||
MAIN_SITE_RECOMMENDATIONS_URL: /en/tools.html
|
|
||||||
MAIN_SITE_KNOWLEDGE_BASE_URL: /en/basics/why-privacy-matters.html
|
|
||||||
ARTICLES_SITE_BASE_URL: /articles/index.html
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add GitHub Token to Environment
|
|
||||||
run: |
|
|
||||||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Download Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repo }}
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download Submodules
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: repo-*
|
|
||||||
path: modules
|
|
||||||
|
|
||||||
- name: Move mkdocs-material-insiders to mkdocs-material
|
|
||||||
run: |
|
|
||||||
rmdir modules/mkdocs-material
|
|
||||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
|
||||||
|
|
||||||
- name: Move brand submodule to theme/assets/brand
|
|
||||||
run: |
|
|
||||||
rmdir theme/assets/brand
|
|
||||||
mv modules/repo-brand theme/assets/brand
|
|
||||||
|
|
||||||
- name: Install Python (pipenv)
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
cache: "pipenv"
|
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
|
||||||
run: |
|
|
||||||
pip install pipenv
|
|
||||||
pipenv install
|
|
||||||
sudo apt install pngquant
|
|
||||||
|
|
||||||
- name: Generate Donating Members List
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
|
||||||
run: |
|
|
||||||
pip install requests
|
|
||||||
python tools/generate-members.py > includes/members.md
|
|
||||||
|
|
||||||
- name: Build English
|
|
||||||
run: |
|
|
||||||
./run.sh --build --production --insiders --offline --lang=en
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/en/assets
|
|
||||||
SEARCH_DIR: site/en
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for top posts
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
|
||||||
--tag="top posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=3
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for latest posts
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/latest.json' \
|
|
||||||
--tag="latest posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=12
|
|
||||||
|
|
||||||
- name: Build Articles
|
|
||||||
run: |
|
|
||||||
pipenv run mkdocs build --config-file mkdocs.blog.yml
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/articles/assets
|
|
||||||
SEARCH_DIR: site/articles
|
|
||||||
|
|
||||||
- name: Remove Duplicate Files
|
|
||||||
run: |
|
|
||||||
cd site && bash ../tools/symlink-duplicates.sh
|
|
||||||
ln -s en/index.html index.html
|
|
||||||
ln -s en/about/notices.html license
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Set zimfile name
|
|
||||||
run: |
|
|
||||||
echo "ZIMFILE_NAME=privacyguides.org_en_all_$(date +%Y)-$(date +%m).zim" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Create ZIM File
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimwriterfs \
|
|
||||||
-w index.html \
|
|
||||||
-I en/assets/brand/logos/png/square/pg-yellow.png \
|
|
||||||
-l eng \
|
|
||||||
-t "Privacy Guides" \
|
|
||||||
-d "Your central privacy and security resource to protect yourself online." \
|
|
||||||
-c "Privacy Guides" \
|
|
||||||
-p "Privacy Guides" \
|
|
||||||
-e "https://www.privacyguides.org" \
|
|
||||||
-n "privacyguides.org_en_all" \
|
|
||||||
/data/site/ /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
- name: Upload ZIM File
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.ZIMFILE_NAME }}
|
|
||||||
name: ${{ env.ZIMFILE_NAME }}
|
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
- name: Run zimcheck
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimcheck /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
package_eng_kb:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
LANGUAGE_SWITCHER: false
|
|
||||||
ARTICLES_SITE_BASE_URL: https://www.privacyguides.org/articles/
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add GitHub Token to Environment
|
|
||||||
run: |
|
|
||||||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Download Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repo }}
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download Submodules
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: repo-*
|
|
||||||
path: modules
|
|
||||||
|
|
||||||
- name: Move mkdocs-material-insiders to mkdocs-material
|
|
||||||
run: |
|
|
||||||
rmdir modules/mkdocs-material
|
|
||||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
|
||||||
|
|
||||||
- name: Move brand submodule to theme/assets/brand
|
|
||||||
run: |
|
|
||||||
rmdir theme/assets/brand
|
|
||||||
mv modules/repo-brand theme/assets/brand
|
|
||||||
|
|
||||||
- name: Install Python (pipenv)
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
cache: "pipenv"
|
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
|
||||||
run: |
|
|
||||||
pip install pipenv
|
|
||||||
pipenv install
|
|
||||||
sudo apt install pngquant
|
|
||||||
|
|
||||||
- name: Generate Donating Members List
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
|
||||||
run: |
|
|
||||||
pip install requests
|
|
||||||
python tools/generate-members.py > includes/members.md
|
|
||||||
|
|
||||||
- name: Build English
|
|
||||||
run: |
|
|
||||||
./run.sh --build --production --insiders --offline --lang=en
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for top posts
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
|
||||||
--tag="top posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=3
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for latest posts
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/latest.json' \
|
|
||||||
--tag="latest posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=12
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/en/assets
|
|
||||||
SEARCH_DIR: site/en
|
|
||||||
|
|
||||||
- name: Remove Duplicate Files
|
|
||||||
run: |
|
|
||||||
cd site && bash ../tools/symlink-duplicates.sh
|
|
||||||
ln -s en/index.html index.html
|
|
||||||
ln -s en/about/notices.html license
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Set zimfile name
|
|
||||||
run: |
|
|
||||||
echo "ZIMFILE_NAME=privacyguides.org_en_kb_$(date +%Y)-$(date +%m).zim" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Create ZIM File
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimwriterfs \
|
|
||||||
-w index.html \
|
|
||||||
-I en/assets/brand/logos/png/square/pg-yellow.png \
|
|
||||||
-l eng \
|
|
||||||
-t "Privacy Guides" \
|
|
||||||
-d "Knowledge base articles and recommendations from Privacy Guides." \
|
|
||||||
-c "Privacy Guides" \
|
|
||||||
-p "Privacy Guides" \
|
|
||||||
-e "https://www.privacyguides.org" \
|
|
||||||
-n "privacyguides.org_en_kb" \
|
|
||||||
/data/site/ /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
- name: Upload ZIM File
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.ZIMFILE_NAME }}
|
|
||||||
name: ${{ env.ZIMFILE_NAME }}
|
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
- name: Run zimcheck
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimcheck /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
package_eng_articles:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
MAIN_SITE_BASE_URL: https://www.privacyguides.org/en/
|
|
||||||
MAIN_SITE_ABOUT_URL: https://www.privacyguides.org/en/about/
|
|
||||||
MAIN_SITE_RECOMMENDATIONS_URL: https://www.privacyguides.org/en/tools/
|
|
||||||
MAIN_SITE_KNOWLEDGE_BASE_URL: https://www.privacyguides.org/en/basics/
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add GitHub Token to Environment
|
|
||||||
run: |
|
|
||||||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Download Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repo }}
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download Submodules
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: repo-*
|
|
||||||
path: modules
|
|
||||||
|
|
||||||
- name: Move mkdocs-material-insiders to mkdocs-material
|
|
||||||
run: |
|
|
||||||
rmdir modules/mkdocs-material
|
|
||||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
|
||||||
|
|
||||||
- name: Move brand submodule to theme/assets/brand
|
|
||||||
run: |
|
|
||||||
rmdir theme/assets/brand
|
|
||||||
mv modules/repo-brand theme/assets/brand
|
|
||||||
|
|
||||||
- name: Install Python (pipenv)
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
cache: "pipenv"
|
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
|
||||||
run: |
|
|
||||||
pip install pipenv
|
|
||||||
pipenv install
|
|
||||||
sudo apt install pngquant
|
|
||||||
|
|
||||||
- name: Build Articles
|
|
||||||
run: |
|
|
||||||
pipenv run mkdocs build --config-file mkdocs.blog.yml
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/articles/assets
|
|
||||||
SEARCH_DIR: site/articles
|
|
||||||
|
|
||||||
- name: Remove Duplicate Files
|
|
||||||
run: |
|
|
||||||
cd site && bash ../tools/symlink-duplicates.sh
|
|
||||||
ln -s articles/index.html index.html
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Set zimfile name
|
|
||||||
run: |
|
|
||||||
echo "ZIMFILE_NAME=privacyguides.org_en_articles_$(date +%Y)-$(date +%m).zim" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Create ZIM File
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimwriterfs \
|
|
||||||
-w index.html \
|
|
||||||
-I articles/assets/brand/logos/png/square/pg-yellow.png \
|
|
||||||
-l eng \
|
|
||||||
-t "Privacy Guides" \
|
|
||||||
-d "Long-form articles from the Privacy Guides team and other contributors." \
|
|
||||||
-c "Privacy Guides" \
|
|
||||||
-p "Privacy Guides" \
|
|
||||||
-e "https://www.privacyguides.org" \
|
|
||||||
-n "privacyguides.org_en_articles" \
|
|
||||||
/data/site/ /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
- name: Upload ZIM File
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.ZIMFILE_NAME }}
|
|
||||||
name: ${{ env.ZIMFILE_NAME }}
|
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
- name: Run zimcheck
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimcheck /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
build_mul:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
MAIN_SITE_BASE_URL: /en/index.html
|
|
||||||
MAIN_SITE_ABOUT_URL: /en/about.html
|
|
||||||
MAIN_SITE_RECOMMENDATIONS_URL: /en/tools.html
|
|
||||||
MAIN_SITE_KNOWLEDGE_BASE_URL: /en/basics/why-privacy-matters.html
|
|
||||||
ARTICLES_SITE_BASE_URL: /articles/index.html
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add GitHub Token to Environment
|
|
||||||
run: |
|
|
||||||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Download Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repo }}
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download Submodules
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: repo-*
|
|
||||||
path: modules
|
|
||||||
|
|
||||||
- name: Move mkdocs-material-insiders to mkdocs-material
|
|
||||||
run: |
|
|
||||||
rmdir modules/mkdocs-material
|
|
||||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
|
||||||
|
|
||||||
- name: Move brand submodule to theme/assets/brand
|
|
||||||
run: |
|
|
||||||
rmdir theme/assets/brand
|
|
||||||
mv modules/repo-brand theme/assets/brand
|
|
||||||
|
|
||||||
- name: Copy Translation Files
|
|
||||||
if: matrix.lang != 'en'
|
|
||||||
run: |
|
|
||||||
cp -rl modules/repo-i18n/i18n .
|
|
||||||
cp -rl modules/repo-i18n/includes .
|
|
||||||
|
|
||||||
- name: Install Python (pipenv)
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
cache: "pipenv"
|
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
|
||||||
run: |
|
|
||||||
pip install pipenv
|
|
||||||
pipenv install
|
|
||||||
sudo apt install pngquant
|
|
||||||
|
|
||||||
- name: Generate Donating Members List
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
|
||||||
run: |
|
|
||||||
pip install requests
|
|
||||||
python tools/generate-members.py > includes/members.md
|
|
||||||
|
|
||||||
- name: Build Website
|
|
||||||
run: |
|
|
||||||
./run.sh --build --production --insiders --offline --lang=${{ matrix.lang }}
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for top posts
|
|
||||||
if: matrix.lang == 'en'
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
|
||||||
--tag="top posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=3
|
|
||||||
|
|
||||||
- name: Run generate-topics.sh for latest posts
|
|
||||||
if: matrix.lang == 'en'
|
|
||||||
run: |
|
|
||||||
bash tools/generate-topics.sh \
|
|
||||||
--source='https://discuss.privacyguides.net/latest.json' \
|
|
||||||
--tag="latest posts" \
|
|
||||||
--destination="./site/en/index.html" \
|
|
||||||
--count=12
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/${{ matrix.lang }}/assets
|
|
||||||
SEARCH_DIR: site/${{ matrix.lang }}
|
|
||||||
|
|
||||||
- name: Build Articles
|
|
||||||
if: matrix.lang == 'en'
|
|
||||||
run: |
|
|
||||||
pipenv run mkdocs build --config-file mkdocs.blog.yml
|
|
||||||
|
|
||||||
- name: Delete Unreferenced Assets
|
|
||||||
if: matrix.lang == 'en'
|
|
||||||
run: |
|
|
||||||
bash tools/delete-unreferenced.sh
|
|
||||||
env:
|
|
||||||
ASSETS_DIR: site/articles/assets
|
|
||||||
SEARCH_DIR: site/articles
|
|
||||||
|
|
||||||
- name: Package Website
|
|
||||||
run: |
|
|
||||||
tar -czf site-zimready-${{ matrix.lang }}.tar.gz site
|
|
||||||
|
|
||||||
- name: Upload Site
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: site-zimready-${{ matrix.lang }}.tar.gz
|
|
||||||
path: site-zimready-${{ matrix.lang }}.tar.gz
|
|
||||||
retention-days: 1
|
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
package_mul:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build_mul]
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Download Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repo }}
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download All Sites
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: site-zimready-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: List Files (for debugging)
|
|
||||||
run: |
|
|
||||||
for file in *.tar.gz; do tar -zxf "$file"; done
|
|
||||||
ls -la site/
|
|
||||||
|
|
||||||
- name: Remove Duplicate Files
|
|
||||||
run: |
|
|
||||||
cd site && bash ../tools/symlink-duplicates.sh
|
|
||||||
ln -s en/index.html index.html
|
|
||||||
ln -s en/about/notices.html license
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Set zimfile name
|
|
||||||
run: |
|
|
||||||
echo "ZIMFILE_NAME=privacyguides.org_mul_all_$(date +%Y)-$(date +%m).zim" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Create ZIM File
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimwriterfs \
|
|
||||||
-w index.html \
|
|
||||||
-I en/assets/brand/logos/png/square/pg-yellow.png \
|
|
||||||
-l mul \
|
|
||||||
-t "Privacy Guides" \
|
|
||||||
-d "Your central privacy and security resource to protect yourself online." \
|
|
||||||
-c "Privacy Guides" \
|
|
||||||
-p "Privacy Guides" \
|
|
||||||
-e "https://www.privacyguides.org" \
|
|
||||||
-n "privacyguides.org_mul_all" \
|
|
||||||
/data/site/ /data/${{ env.ZIMFILE_NAME }}
|
|
||||||
|
|
||||||
- name: Upload ZIM File
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.ZIMFILE_NAME }}
|
|
||||||
name: ${{ env.ZIMFILE_NAME }}
|
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
- name: Run zimcheck
|
|
||||||
uses: addnab/docker-run-action@v3
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
image: ghcr.io/openzim/zim-tools:3.1.3
|
|
||||||
options: -v ${{ github.workspace }}:/data
|
|
||||||
run: |
|
|
||||||
zimcheck /data/${{ env.ZIMFILE_NAME }}
|
|
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
@@ -180,7 +180,7 @@ jobs:
|
|||||||
DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
||||||
run: |
|
run: |
|
||||||
pip install requests
|
pip install requests
|
||||||
python tools/generate-members.py > includes/members.md
|
python generate-members.py > includes/members.md
|
||||||
|
|
||||||
- name: Build Website
|
- name: Build Website
|
||||||
run: |
|
run: |
|
||||||
@@ -189,7 +189,7 @@ jobs:
|
|||||||
- name: Run generate-topics.sh for top posts
|
- name: Run generate-topics.sh for top posts
|
||||||
if: inputs.lang == 'en'
|
if: inputs.lang == 'en'
|
||||||
run: |
|
run: |
|
||||||
bash tools/generate-topics.sh \
|
bash generate-topics.sh \
|
||||||
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
||||||
--tag="top posts" \
|
--tag="top posts" \
|
||||||
--destination="./site/en/index.html" \
|
--destination="./site/en/index.html" \
|
||||||
@@ -198,7 +198,7 @@ jobs:
|
|||||||
- name: Run generate-topics.sh for latest posts
|
- name: Run generate-topics.sh for latest posts
|
||||||
if: inputs.lang == 'en'
|
if: inputs.lang == 'en'
|
||||||
run: |
|
run: |
|
||||||
bash tools/generate-topics.sh \
|
bash generate-topics.sh \
|
||||||
--source='https://discuss.privacyguides.net/latest.json' \
|
--source='https://discuss.privacyguides.net/latest.json' \
|
||||||
--tag="latest posts" \
|
--tag="latest posts" \
|
||||||
--destination="./site/en/index.html" \
|
--destination="./site/en/index.html" \
|
||||||
@@ -259,3 +259,47 @@ jobs:
|
|||||||
name: members.md
|
name: members.md
|
||||||
path: includes/members.md
|
path: includes/members.md
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
offline_package:
|
||||||
|
if: inputs.config == 'offline' && inputs.lang == 'en'
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: ${{ inputs.continue-on-error }}
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: site-offline-en.tar.gz
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
tar -xzf site-offline-en.tar.gz
|
||||||
|
tar -czf offline.tar.gz site/en
|
||||||
|
zip -r -q offline.zip site/en
|
||||||
|
|
||||||
|
- name: Upload tar.gz file
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: offline.tar.gz
|
||||||
|
path: offline.tar.gz
|
||||||
|
|
||||||
|
- name: Upload zip file
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: offline.zip
|
||||||
|
path: offline.zip
|
||||||
|
|
||||||
|
- name: Create ZIM File
|
||||||
|
uses: addnab/docker-run-action@v3
|
||||||
|
with:
|
||||||
|
image: ghcr.io/openzim/zim-tools:3.1.3
|
||||||
|
options: -v ${{ github.workspace }}:/data
|
||||||
|
run: |
|
||||||
|
zimwriterfs -w index.html -I assets/brand/logos/png/square/pg-yellow.png -l eng -t "Privacy Guides" -d "Your central privacy and security resource to protect yourself online." -c "Privacy Guides" -p "Jonah Aragon" -n "Privacy Guides" -e "https://github.com/privacyguides/privacyguides.org" /data/site/en /data/offline-privacy_guides.zim
|
||||||
|
|
||||||
|
- name: Upload ZIM file
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: offline-privacy_guides.zim
|
||||||
|
path: offline-privacy_guides.zim
|
||||||
|
23
.github/workflows/publish-release.yml
vendored
23
.github/workflows/publish-release.yml
vendored
@@ -50,8 +50,8 @@ jobs:
|
|||||||
needs: submodule
|
needs: submodule
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
|
lang: [en, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||||
build: [build]
|
build: [build, offline]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@@ -77,20 +77,9 @@ jobs:
|
|||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
context: production
|
context: production
|
||||||
|
|
||||||
build_zimfile:
|
|
||||||
needs: submodule
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
uses: ./.github/workflows/build-zimfile.yml
|
|
||||||
with:
|
|
||||||
repo: ${{ github.repository }}
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
secrets:
|
|
||||||
RO_DISCOURSE_API_KEY: ${{ secrets.RO_DISCOURSE_API_KEY }}
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create release notes
|
name: Create release notes
|
||||||
needs: [build, build_zimfile]
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -98,14 +87,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: "*.zim"
|
pattern: offline*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Create release notes
|
- name: Create release notes
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
generateReleaseNotes: true
|
generateReleaseNotes: true
|
||||||
artifacts: "*.zim"
|
artifacts: "offline.zip,offline.tar.gz,offline-privacy_guides.zim"
|
||||||
makeLatest: true
|
makeLatest: true
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@@ -126,5 +115,5 @@ jobs:
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: [build, build_blog, build_zimfile]
|
needs: [build, build_blog]
|
||||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
||||||
|
4
.github/workflows/update-discussions.yml
vendored
4
.github/workflows/update-discussions.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run generate-topics.sh for top posts
|
- name: Run generate-topics.sh for top posts
|
||||||
run: |
|
run: |
|
||||||
bash tools/generate-topics.sh \
|
bash generate-topics.sh \
|
||||||
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
--source='https://discuss.privacyguides.net/top.json?period=weekly' \
|
||||||
--tag="top posts" \
|
--tag="top posts" \
|
||||||
--destination="./site/en/index.html" \
|
--destination="./site/en/index.html" \
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run generate-topics.sh for latest posts
|
- name: Run generate-topics.sh for latest posts
|
||||||
run: |
|
run: |
|
||||||
bash tools/generate-topics.sh \
|
bash generate-topics.sh \
|
||||||
--source='https://discuss.privacyguides.net/latest.json' \
|
--source='https://discuss.privacyguides.net/latest.json' \
|
||||||
--tag="latest posts" \
|
--tag="latest posts" \
|
||||||
--destination="./site/en/index.html" \
|
--destination="./site/en/index.html" \
|
||||||
|
@@ -14,6 +14,7 @@ preview:
|
|||||||
# The Power of Digital Provenance in the Age of AI
|
# The Power of Digital Provenance in the Age of AI
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<small aria-hidden="true">Photo: Kseniya Lapteva / Pexels | Logo: Content Credentials</small>
|
<small aria-hidden="true">Photo: Kseniya Lapteva / Pexels | Logo: Content Credentials</small>
|
||||||
|
|
||||||
With the popularity of generative AI, it's becoming more and more difficult to [distinguish](https://uwaterloo.ca/news/media/can-you-tell-ai-generated-people-real-ones) reality from fiction. Can this problem be solved using cryptography? What are the privacy implications of the currently proposed systems?<!-- more -->
|
With the popularity of generative AI, it's becoming more and more difficult to [distinguish](https://uwaterloo.ca/news/media/can-you-tell-ai-generated-people-real-ones) reality from fiction. Can this problem be solved using cryptography? What are the privacy implications of the currently proposed systems?<!-- more -->
|
||||||
|
@@ -19,6 +19,7 @@ schema_type: NewsArticle
|
|||||||
# Welcome to Privacy Guides
|
# Welcome to Privacy Guides
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<small aria-hidden="true">Illustration: Jonah Aragon / Privacy Guides</small>
|
<small aria-hidden="true">Illustration: Jonah Aragon / Privacy Guides</small>
|
||||||
|
|
||||||
We are excited to announce the launch of [Privacy Guides](https://www.privacyguides.org/) and [r/PrivacyGuides](https://www.reddit.com/r/PrivacyGuides/), and welcome the privacy community to participate in our crowdsourced software recommendations and share tips and tricks for keeping your data safe online. Our goal is to be a central resource for privacy and security-related tips that are usable by anybody, and to carry on the trusted legacy of PrivacyTools.<!-- more -->
|
We are excited to announce the launch of [Privacy Guides](https://www.privacyguides.org/) and [r/PrivacyGuides](https://www.reddit.com/r/PrivacyGuides/), and welcome the privacy community to participate in our crowdsourced software recommendations and share tips and tricks for keeping your data safe online. Our goal is to be a central resource for privacy and security-related tips that are usable by anybody, and to carry on the trusted legacy of PrivacyTools.<!-- more -->
|
||||||
|
@@ -37,7 +37,7 @@ The best way to get individual help is from our community on Discourse. If you n
|
|||||||
|
|
||||||
{ align=right }
|
{ align=right }
|
||||||
|
|
||||||
Have a tip for us, or need to share some sensitive information? The best way to get in touch with us securely is via `@privacyguides.01` on Signal. This group account is monitored by [Jonah](https://discuss.privacyguides.net/u/jonah), [Niek](https://discuss.privacyguides.net/u/niek-de-wilde), [Em](https://discuss.privacyguides.net/u/em), and [Jordan](https://discuss.privacyguides.net/u/jordan).
|
Have a tip for us, or need to share some sensitive information? The best way to get in touch with us securely is via `@privacyguides.01` on Signal. This group account is monitored by [Jonah](https://discuss.privacyguides.net/u/jonah), [Niek](https://discuss.privacyguides.net/u/niek-de-wilde), [Em](https://discuss.privacyguides.net/u/ematprivacyguides), and [Jordan](https://discuss.privacyguides.net/u/jordan).
|
||||||
|
|
||||||
[:simple-signal: Chat on Signal](https://signal.me/#eu/zg9xcrIv5w-EtXt2FmTJgfWv01LmyTed8rpr7RDv35Mizq8ISZ9NJLmYtzsxI0Z4){ .md-button }
|
[:simple-signal: Chat on Signal](https://signal.me/#eu/zg9xcrIv5w-EtXt2FmTJgfWv01LmyTed8rpr7RDv35Mizq8ISZ9NJLmYtzsxI0Z4){ .md-button }
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ Our staff are paid to contribute to supplemental content at Privacy Guides, like
|
|||||||
|
|
||||||
:material-text-account: Journalist
|
:material-text-account: Journalist
|
||||||
|
|
||||||
[:material-account: Profile](https://discuss.privacyguides.net/u/em)
|
[:material-account: Profile](https://discuss.privacyguides.net/u/ematprivacyguides)
|
||||||
|
|
||||||
[:material-github:](https://github.com/EmAtPrivacyGuides "GitHub")
|
[:material-github:](https://github.com/EmAtPrivacyGuides "GitHub")
|
||||||
[:material-mastodon:](https://infosec.exchange/@Em0nM4stodon "@Em0nM4stodon@infosec.exchange"){rel=me}
|
[:material-mastodon:](https://infosec.exchange/@Em0nM4stodon "@Em0nM4stodon@infosec.exchange"){rel=me}
|
||||||
|
@@ -67,9 +67,7 @@ for row in $(echo "${topics}" | jq -r '.[] | @base64'); do
|
|||||||
html_output+="<hr>"
|
html_output+="<hr>"
|
||||||
html_output+="<p class='discourse-author'>"
|
html_output+="<p class='discourse-author'>"
|
||||||
html_output+="<span class='discourse-author'>"
|
html_output+="<span class='discourse-author'>"
|
||||||
if [[ -z "$BUILD_OFFLINE" ]]; then
|
html_output+="<img src='https://forum-cdn.privacyguides.net/user_avatar/discuss.privacyguides.net/${author_username}/48/1.png' loading='lazy' aria-hidden='true' alt='${author_username}' width='20' height='20' class='middle'>"
|
||||||
html_output+="<img src='https://forum-cdn.privacyguides.net/user_avatar/discuss.privacyguides.net/${author_username}/48/1.png' loading='lazy' aria-hidden='true' alt='${author_username}' width='20' height='20' class='middle'>"
|
|
||||||
fi
|
|
||||||
html_output+="<span> Posted by <em>$author_username</em></span>"
|
html_output+="<span> Posted by <em>$author_username</em></span>"
|
||||||
html_output+="</span>"
|
html_output+="</span>"
|
||||||
html_output+="</p>"
|
html_output+="</p>"
|
13
mkdocs.yml
13
mkdocs.yml
@@ -123,10 +123,10 @@ extra:
|
|||||||
link: https://matrix.to/#/#privacyguides:matrix.org
|
link: https://matrix.to/#/#privacyguides:matrix.org
|
||||||
- icon: material/information-outline
|
- icon: material/information-outline
|
||||||
name: !ENV [HOMEPAGE_CTA_ABOUT_NAME, "Learn more about us"]
|
name: !ENV [HOMEPAGE_CTA_ABOUT_NAME, "Learn more about us"]
|
||||||
link: !ENV [HOMEPAGE_CTA_ABOUT_LINK, "about/"]
|
link: about/
|
||||||
- icon: material/hand-coin
|
- icon: material/hand-coin
|
||||||
name: !ENV [HOMEPAGE_CTA_DONATE_NAME, "Donate to Privacy Guides"]
|
name: !ENV [HOMEPAGE_CTA_DONATE_NAME, "Donate to Privacy Guides"]
|
||||||
link: !ENV [HOMEPAGE_CTA_DONATE_LINK, "about/donate/"]
|
link: about/donate/
|
||||||
description:
|
description:
|
||||||
!ENV [
|
!ENV [
|
||||||
HOMEPAGE_CTA_DESCRIPTION,
|
HOMEPAGE_CTA_DESCRIPTION,
|
||||||
@@ -183,7 +183,6 @@ extra:
|
|||||||
- icon: simple/torbrowser
|
- icon: simple/torbrowser
|
||||||
link: http://www.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/
|
link: http://www.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/
|
||||||
name: !ENV [SOCIAL_TOR_SITE, "Hidden service"]
|
name: !ENV [SOCIAL_TOR_SITE, "Hidden service"]
|
||||||
language_switcher: !ENV [LANGUAGE_SWITCHER, true]
|
|
||||||
alternate:
|
alternate:
|
||||||
- name: English
|
- name: English
|
||||||
link: /en/
|
link: /en/
|
||||||
@@ -209,10 +208,14 @@ extra:
|
|||||||
link: /nl/
|
link: /nl/
|
||||||
lang: nl
|
lang: nl
|
||||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f3-1f1f1.svg
|
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f3-1f1f1.svg
|
||||||
- name: 正體中文
|
- name: 中文 (繁體)
|
||||||
link: /zh-hant/
|
link: /zh-hant/
|
||||||
lang: zh-Hant
|
lang: zh-Hant
|
||||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1ed-1f1f0.svg
|
icon: https://raw.githubusercontent.com/jdecked/twemoji/master/assets/svg/1f1ed-1f1f0.svg
|
||||||
|
- name: 中文 (繁體,台灣)
|
||||||
|
link: /zh-TW/
|
||||||
|
lang: zh-TW
|
||||||
|
icon: https://raw.githubusercontent.com/jdecked/twemoji/master/assets/svg/1f1f9-1f1fc.svg
|
||||||
- name: Русский
|
- name: Русский
|
||||||
link: /ru/
|
link: /ru/
|
||||||
lang: ru
|
lang: ru
|
||||||
|
6
run.sh
6
run.sh
@@ -100,14 +100,14 @@ if [ "$language" == "he" ]; then
|
|||||||
export BUILD_THEME_FONT_TEXT="Open Sans"
|
export BUILD_THEME_FONT_TEXT="Open Sans"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set font if chinese
|
# Set font if russian or chinese
|
||||||
if [ "$language" == "zh-Hant" ]; then
|
if [[ "ru zh-Hant zh-TW" =~ $language ]]; then
|
||||||
export BUILD_THEME_FONT_CODE="Noto Sans TC"
|
export BUILD_THEME_FONT_CODE="Noto Sans TC"
|
||||||
export BUILD_THEME_FONT_TEXT="Noto Sans TC"
|
export BUILD_THEME_FONT_TEXT="Noto Sans TC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set stylesheet if hebrew or russian or chinese
|
# Set stylesheet if hebrew or russian or chinese
|
||||||
if [[ "he ru zh-Hant" =~ $language ]]; then
|
if [[ "he ru zh-Hant zh-TW" =~ $language ]]; then
|
||||||
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
|
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
58
theme/assets/stylesheets/lang-zh-TW.css
Normal file
58
theme/assets/stylesheets/lang-zh-TW.css
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
/// Copyright (c) 2023 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* chinese-traditional */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-400-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-400-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* chinese-traditional */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-700-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-700-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, .md-header__topic {
|
||||||
|
font-family: "Bagnard", "Noto Serif TC", serif;
|
||||||
|
font-weight: 700!important;
|
||||||
|
}
|
@@ -11,7 +11,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
@@ -19,7 +19,7 @@ definitions:
|
|||||||
- &title_font_family >-
|
- &title_font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Serif TC
|
Noto Serif TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Bagnard
|
Bagnard
|
||||||
@@ -35,7 +35,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
@@ -15,7 +15,7 @@ definitions:
|
|||||||
- &title_font_family >-
|
- &title_font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Serif TC
|
Noto Serif TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Bagnard
|
Bagnard
|
||||||
@@ -24,7 +24,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
<br />
|
<br />
|
||||||
{{ copyright.note }}
|
{{ copyright.note }}
|
||||||
<br />
|
<br />
|
||||||
<a href='https://www.privacyguides.org/license' aria-label="More information about our website license.">
|
<a href='/license' aria-label="More information about our website license.">
|
||||||
{% for icon in copyright.license %}
|
{% for icon in copyright.license %}
|
||||||
<span class="twemoji">{% include ".icons/" ~ icon ~ ".svg" %}</span>
|
<span class="twemoji">{% include ".icons/" ~ icon ~ ".svg" %}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="md-header__option">
|
<div class="md-header__option">
|
||||||
<div class="">
|
<div class="">
|
||||||
{% set icon = "material/heart" %}
|
{% set icon = "material/heart" %}
|
||||||
<a href="https://www.privacyguides.org/{{ config.theme.language }}/about/donate/" class="md-header__button md-icon pg-red" title="Donate">
|
<a href="/en/about/donate/" class="md-header__button md-icon pg-red" title="Donate">
|
||||||
{% include ".icons/" ~ icon ~ ".svg" %}
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -121,7 +121,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Site language selector -->
|
<!-- Site language selector -->
|
||||||
{% if config.extra.alternate and config.extra.language_switcher %}
|
{% if config.extra.alternate %}
|
||||||
{% include "partials/alternate.html" %}
|
{% include "partials/alternate.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
REPO="privacyguides/privacyguides.org"
|
|
||||||
BASE_DIR="releases"
|
|
||||||
|
|
||||||
mkdir -p "$BASE_DIR"
|
|
||||||
|
|
||||||
# Get all release tags using gh CLI
|
|
||||||
release_tags=$(gh release list -R "$REPO" --limit 1000 | awk '{print $1}')
|
|
||||||
|
|
||||||
for tag in $release_tags; do
|
|
||||||
target_dir="$BASE_DIR/$tag"
|
|
||||||
mkdir -p "$target_dir"
|
|
||||||
echo "Downloading assets for release: $tag"
|
|
||||||
gh release download "$tag" -R "$REPO" --dir "$target_dir"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All releases downloaded."
|
|
@@ -1,64 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Script to find and delete unreferenced asset files
|
|
||||||
# This script searches through all HTML, CSS, and JavaScript files to see if asset files are referenced
|
|
||||||
|
|
||||||
set -e # Exit on any error
|
|
||||||
|
|
||||||
echo -e "Starting unreferenced asset cleanup..."
|
|
||||||
echo "Assets directory: $ASSETS_DIR"
|
|
||||||
echo "Search directory: $SEARCH_DIR"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check if assets directory exists
|
|
||||||
if [ ! -d "$ASSETS_DIR" ]; then
|
|
||||||
echo -e "Error: Assets directory '$ASSETS_DIR' not found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find all asset files recursively
|
|
||||||
echo "Finding all asset files..."
|
|
||||||
ASSET_FILES=$(find "$ASSETS_DIR" -type f)
|
|
||||||
ASSET_COUNT=$(echo "$ASSET_FILES" | wc -l)
|
|
||||||
echo "Found $ASSET_COUNT asset files"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Find all HTML, CSS, and JavaScript files
|
|
||||||
echo "Finding all HTML, CSS, and JavaScript files..."
|
|
||||||
SEARCH_FILES=$(find "$SEARCH_DIR" \( -name "*.html" -o -name "*.css" -o -name "*.js" \) -type f)
|
|
||||||
SEARCH_COUNT=$(echo "$SEARCH_FILES" | wc -l)
|
|
||||||
echo "Found $SEARCH_COUNT HTML, CSS, and JavaScript files"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Process each asset file
|
|
||||||
echo "Checking each asset file for references..."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
while IFS= read -r asset_file; do
|
|
||||||
if [ -z "$asset_file" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get just the filename (without path)
|
|
||||||
asset_filename=$(basename "$asset_file")
|
|
||||||
|
|
||||||
# Search for this filename in all HTML, CSS, and JavaScript files
|
|
||||||
found_reference=false
|
|
||||||
|
|
||||||
while IFS= read -r search_file; do
|
|
||||||
if [ -z "$search_file" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Simple string search for the filename in the file
|
|
||||||
if grep -q "$asset_filename" "$search_file" 2>/dev/null; then
|
|
||||||
found_reference=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done <<< "$SEARCH_FILES"
|
|
||||||
|
|
||||||
if [ "$found_reference" = false ]; then
|
|
||||||
echo -e "Unreferenced: $asset_file"
|
|
||||||
rm "$asset_file"
|
|
||||||
fi
|
|
||||||
done <<< "$ASSET_FILES"
|
|
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
declare -A file_hashes
|
|
||||||
|
|
||||||
find . -type f | while read -r file; do
|
|
||||||
hash=$(sha256sum "$file" | awk '{print $1}')
|
|
||||||
if [[ -n "${file_hashes[$hash]+_}" ]]; then
|
|
||||||
# Duplicate found, replace with symlink to first copy
|
|
||||||
first="${file_hashes[$hash]}"
|
|
||||||
# Remove the duplicate file
|
|
||||||
rm "$file"
|
|
||||||
# Create symlink (relative path)
|
|
||||||
ln -s "$(realpath --relative-to="$(dirname "$file")" "$first")" "$file"
|
|
||||||
echo "Replaced duplicate: $file -> $first"
|
|
||||||
else
|
|
||||||
# First time seeing this hash
|
|
||||||
file_hashes[$hash]="$file"
|
|
||||||
fi
|
|
||||||
done
|
|
Reference in New Issue
Block a user