Skip to content

Commit

Permalink
Stop using i18n plugin (#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Feb 28, 2023
1 parent 66efe4a commit b8d0665
Show file tree
Hide file tree
Showing 548 changed files with 384 additions and 33,069 deletions.
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
path = modules/mkdocs-material
url = git@github.com:privacyguides/mkdocs-material-insiders.git
[submodule "docs/assets/brand"]
path = docs/assets/brand
path = theme/assets/brand
url = https://github.com/privacyguides/brand.git
[submodule "mkdocs-static-i18n"]
path = modules/mkdocs-static-i18n
url = git@github.com:privacyguides/mkdocs-static-i18n.git
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<a href="https://github.com/privacyguides/privacyguides.org/pulls?q=is%3Apr+is%3Aclosed">
<img src="https://img.shields.io/github/issues-pr-closed-raw/privacyguides/privacyguides.org">
</a>
<a href="https://crowdin.com/project/privacyguides">
<img src="https://badges.crowdin.net/privacyguides/localized.svg">
</a>
<a href="https://opencollective.com/privacyguides">
<img src="https://img.shields.io/opencollective/all/privacyguides">
</a></p>
Expand Down Expand Up @@ -60,19 +63,7 @@ Our current list of team members can be found [here](https://www.privacyguides.o

Committing to this repository requires [signing your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) (`git config commit.gpgsign true`) unless you are making edits via the GitHub.com text editor interface. As of August 2022 the preferred signing method is [SSH commit signatures](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification), but GPG signing is also acceptable. You should add your signing key to your GitHub profile.

This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdocs-material/insiders/) which offers additional functionality over the open-source `mkdocs-material` project. For obvious reasons we cannot distribute access to the insiders repository. You can install the website locally with the open-source version of `mkdocs-material`:

1. Clone this repository:
- `git clone https://github.com/privacyguides/privacyguides.org.git` (then `cd privacyguides.org`)
- `git submodule init`
- `git submodule update docs/assets/brand`
- `git config gpg.ssh.allowedSignersFile .allowed_signers`
2. Install [Python 3.6+](https://www.python.org/downloads/) (currently only tested with 3.10)
3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n mkdocs-macros-plugin typing-extensions`
4. Serve the site locally: `mkdocs serve`
- The site will be available at `http://localhost:8000`
- You can build the site locally with `mkdocs build`
- Your local version of the site may be missing functionality, which is expected. If you are submitting a PR, please ensure the automatic preview generated for your PR looks correct, as that site will be built with the production insiders build.
This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdocs-material/insiders/) which offers additional functionality over the open-source `mkdocs-material` project. For obvious reasons we cannot distribute access to the insiders repository. Running this website locally without access to insiders is unsupported. If you are submitting a PR, please ensure the automatic preview generated for your PR looks correct, as that site will be built with the production insiders build.

**Team members** should clone the repository with `mkdocs-material-insiders` directly. This method is identical to production:

Expand All @@ -81,9 +72,9 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc
3. Install Python **3.10**
4. Install **pipenv**: `pip install pipenv`
5. Install dependencies: `pipenv install --dev` (install [Pillow and CairoSVG](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies) as well to generate social cards)
6. Serve the site locally: `pipenv run mkdocs serve --config-file mkdocs.production.yml` (set `CARDS=true` to generate social cards)
6. Serve the site locally: `pipenv run mkdocs serve --config-file config/mkdocs.en.yml` (set `CARDS=true` to generate social cards)
- The site will be available at `http://localhost:8000`
- You can build the site locally with `pipenv run mkdocs build`
- You can build the site locally with `pipenv run mkdocs build --config-file config/mkdocs.en.yml`
- This version of the site should be identical to the live, production version

If you commit to `main` with commits signed with your SSH key, you should add your SSH key to [`.allowed_signers`](/.allowed_signers) in this repo.
Expand Down
61 changes: 61 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/ /en/ 302 Language=en
/ /fr/ 302 Language=fr
/ /he/ 302 Language=he
/ /nl/ 302 Language=nl
/ /en/ 302

/sitemap.xml /en/sitemap.xml
/CODE_OF_CONDUCT/ /en/CODE_OF_CONDUCT/
/android/ /en/android/
/calendar/ /en/calendar/
/cloud/ /en/cloud/
/data-redaction/ /en/data-redaction/
/desktop-browsers/ /en/desktop-browsers/
/desktop/ /en/desktop/
/dns/ /en/dns/
/email-clients/ /en/email-clients/
/email/ /en/email/
/encryption/ /en/encryption/
/file-sharing/ /en/file-sharing/
/frontends/ /en/frontends/
/kb-archive/ /en/kb-archive/
/mobile-browsers/ /en/mobile-browsers/
/multi-factor-authentication/ /en/multi-factor-authentication/
/news-aggregators/ /en/news-aggregators/
/notebooks/ /en/notebooks/
/passwords/ /en/passwords/
/productivity/ /en/productivity/
/real-time-communication/ /en/real-time-communication/
/router/ /en/router/
/search-engines/ /en/search-engines/
/tools/ /en/tools/
/tor/ /en/tor/
/video-streaming/ /en/video-streaming/
/vpn/ /en/vpn/
/about/criteria/ /en/about/criteria/
/about/donate/ /en/about/donate/
/about/ /en/about/
/about/notices/ /en/about/notices/
/about/privacy-policy/ /en/about/privacy-policy/
/about/privacytools/ /en/about/privacytools/
/about/services/ /en/about/services/
/about/statistics/ /en/about/statistics/
/advanced/communication-network-types/ /en/advanced/communication-network-types/
/advanced/dns-overview/ /en/advanced/dns-overview/
/advanced/tor-overview/ /en/advanced/tor-overview/
/basics/account-creation/ /en/basics/account-creation/
/basics/account-deletion/ /en/basics/account-deletion/
/basics/common-misconceptions/ /en/basics/common-misconceptions/
/basics/common-threats/ /en/basics/common-threats/
/basics/email-security/ /en/basics/email-security/
/basics/multi-factor-authentication/ /en/basics/multi-factor-authentication/
/basics/passwords-overview/ /en/basics/passwords-overview/
/basics/threat-modeling/ /en/basics/threat-modeling/
/basics/vpn-overview/ /en/basics/vpn-overview/
/meta/brand/ /en/meta/brand/
/meta/git-recommendations/ /en/meta/git-recommendations/
/meta/uploading-images/ /en/meta/uploading-images/
/meta/writing-style/ /en/meta/writing-style/
/os/android-overview/ /en/os/android-overview/
/os/linux-overview/ /en/os/linux-overview/
/os/qubes-overview/ /en/os/qubes-overview/
12 changes: 7 additions & 5 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ api_token_env: CROWDIN_PERSONAL_TOKEN
project_id: "509862"
"preserve_hierarchy": true
files:
- source: "/docs/**/*.en.*"
translation: "/docs/**/%file_name%.%two_letters_code%.%file_extension%"
translation_replace:
"en.": ""
skip_untranslated_files: true
- source: "/docs/**/*.*"
translation: "/i18n/%two_letters_code%/**/%file_name%.%file_extension%"
skip_untranslated_files: false
- source: "/theme/overrides/*.en.html"
translation: "/theme/overrides/%file_name%.%two_letters_code%.html"
translation_replace:
Expand All @@ -17,3 +15,7 @@ files:
translation_replace:
"en.": ""
skip_untranslated_files: true
- source: "/mkdocs.en.yml"
translation: "/mkdocs.%two_letters_code%.yml"
translation_replace:
"en.": ""
15 changes: 0 additions & 15 deletions docs/404.de.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/404.es.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/404.fr.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/404.he.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/404.hu.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/404.it.md

This file was deleted.

File renamed without changes.
15 changes: 0 additions & 15 deletions docs/404.nl.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/404.pt-BR.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/about/criteria.fr.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/about/criteria.he.md

This file was deleted.

File renamed without changes.
42 changes: 0 additions & 42 deletions docs/about/criteria.nl.md

This file was deleted.

0 comments on commit b8d0665

Please sign in to comment.