Skip to content

Commit 17f8e4f

Browse files
authored
Merge pull request #548 from geotribu/feature/confidentialite-dependances
Feature : renforce la confidentialité en intégrant les scripts externes pendant le build
2 parents 432f12f + 9071084 commit 17f8e4f

File tree

6 files changed

+35
-34
lines changed

6 files changed

+35
-34
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24-
- name: Set up Python 3.8
24+
- name: Set up Python
2525
uses: actions/setup-python@v2
2626
with:
27-
python-version: 3.8
27+
python-version: 3.9
2828

29-
- name: Set up NodeJS (for search index prebuilding)
30-
uses: actions/setup-node@v2
31-
with:
32-
node-version: '14'
33-
34-
- name: Cache project dependencies (pip)
29+
- name: Cache project dependencies
3530
uses: actions/cache@v2
3631
with:
3732
path: ~/.cache/pip
@@ -52,10 +47,11 @@ jobs:
5247
run: |
5348
mkdocs build --clean --config-file mkdocs.yml --verbose --strict
5449
env:
55-
ENABLED_GIT_AUTHORS: true
56-
ENABLED_GIT_REVISION_DATE: true
50+
MKDOCS_ENABLE_PLUGIN_GIT_AUTHORS: true
51+
MKDOCS_ENABLE_PLUGIN_GIT_DATES: true
52+
MKDOCS_ENABLE_PLUGIN_PRIVACY: true
53+
MKDOCS_ENABLE_PLUGIN_RSS: true
5754
MKDOCS_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
58-
MKDOCS_SEARCH_PREBUILD_INDEX: node
5955

6056
- name: Deploy to Github Pages
6157
run: |

.github/workflows/pr_checker_build.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,17 @@ jobs:
2828
- name: Get source code
2929
uses: actions/checkout@v2
3030

31-
- name: Set up Python 3.8
31+
- name: Set up Python
3232
uses: actions/setup-python@v2
3333
with:
34-
python-version: 3.8
34+
python-version: 3.9
3535

36-
- name: Set up NodeJS (for search index prebuilding)
37-
uses: actions/setup-node@v2
38-
with:
39-
node-version: "14"
40-
41-
- name: Cache project dependencies (pip)
36+
- name: Cache project dependencies
4237
uses: actions/cache@v2
4338
with:
44-
path: ~/.cache/pip
39+
path: |
40+
~/.cache/pip
41+
.cache
4542
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
4643
restore-keys: |
4744
${{ runner.os }}-pip-
@@ -67,8 +64,7 @@ jobs:
6764
6865
- name: Build in strict mode
6966
env:
70-
MKDOCS_SEARCH_PREBUILD_INDEX: node
71-
NETLIFY_BRANDING: '<a href="https://www.netlify.com/"><img alt="Deploys by Netlify" src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" style="float: right;"></a>'
67+
NETLIFY_BRANDING: '<a href="https://www.netlify.com/"><img alt="Deploys by Netlify" src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" style="float: right;"></a>'
7268
run: |
7369
# site name
7470
sed -i "s|^site_name:.*|site_name: Geotribu PREVIEW |" ${{steps.dependencies.outputs.config_path}}

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Extensions
1212
"cSpell.language": "fr",
1313
"yaml.schemas": {
14-
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs*.yml"
14+
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs*.yml",
15+
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml",
16+
"https://json.schemastore.org/markdownlint.json": ".markdownlint*",
1517
}
1618
}

mkdocs-free.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ plugins:
2626
- "*/templates/*"
2727
- "*.yml"
2828
- git-authors:
29-
enabled: !ENV [ENABLED_GIT_AUTHORS, False]
29+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_GIT_AUTHORS, False]
3030
exclude:
3131
- index.md
3232
show_contribution: true
3333
- git-revision-date-localized:
34-
enabled: !ENV [ENABLED_GIT_REVISION_DATE, False]
34+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_GIT_DATES, False]
3535
enable_creation_date: true
3636
fallback_to_build_date: true
3737
locale: fr
@@ -51,6 +51,7 @@ plugins:
5151
as_creation: "date"
5252
as_update: false
5353
datetime_format: "%Y-%m-%d %H:%M"
54+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_RSS, false]
5455
image: "https://cdn.geotribu.fr/img/internal/charte/geotribu_logo_64x64.png"
5556
length: 50
5657
match_path: "(articles|rdp)/.*"
@@ -59,7 +60,8 @@ plugins:
5960
utm_source: "rss-feed"
6061
utm_medium: "RSS"
6162
utm_campaign: "feed-syndication"
62-
- search
63+
- search:
64+
lang: fr
6365
- macros:
6466
include_dir: content/toc_nav_ignored/snippets
6567
- redirects:
@@ -94,6 +96,8 @@ plugins:
9496
"contribuer/workflow_article.md": "contribuer/articles/workflow.md"
9597
"contribuer/backup.md": "contribuer/internal/backup.md"
9698
"contribuer/build_site/markdown_engine.md": "contribuer/internal/markdown_engine.md"
99+
- tags:
100+
tags_file: tags.md
97101

98102
# Theme
99103
theme:
@@ -186,14 +190,13 @@ extra_css:
186190
extra_javascript:
187191
- "theme/assets/javascripts/extra.js"
188192
- "https://cdn.jsdelivr.net/npm/[email protected]/dist/wa-mediabox.min.js"
189-
- "https://unpkg.com/[email protected]/dist/mermaid.min.js"
190193

191194
# Extensions to enhance markdown - see: https://squidfunk.github.io/mkdocs-material/getting-started/#extensions
192195
markdown_extensions:
193196
- abbr
194-
- attr_list
195197
# Admonition - https://squidfunk.github.io/mkdocs-material/extensions/admonition/
196198
- admonition
199+
- attr_list
197200
# Footnotes - https://squidfunk.github.io/mkdocs-material/reference/footnotes/
198201
- footnotes
199202
# Metadata - https://squidfunk.github.io/mkdocs-material/extensions/metadata
@@ -218,7 +221,7 @@ markdown_extensions:
218221
custom_fences:
219222
- name: mermaid
220223
class: mermaid
221-
format: !!python/name:pymdownx.superfences.fence_div_format
224+
format: !!python/name:pymdownx.superfences.fence_code_format
222225
- pymdownx.tabbed:
223226
alternate_style: true
224227
- pymdownx.tasklist:

mkdocs.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ plugins:
2626
- "*/templates/*"
2727
- "*.yml"
2828
- git-authors:
29-
enabled: !ENV [ENABLED_GIT_AUTHORS, False]
29+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_GIT_AUTHORS, False]
3030
exclude:
3131
- index.md
3232
show_contribution: true
3333
- git-revision-date-localized:
34-
enabled: !ENV [ENABLED_GIT_REVISION_DATE, False]
34+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_GIT_DATES, False]
3535
enable_creation_date: true
3636
fallback_to_build_date: true
3737
locale: fr
@@ -51,6 +51,7 @@ plugins:
5151
as_creation: "date"
5252
as_update: false
5353
datetime_format: "%Y-%m-%d %H:%M"
54+
enabled: !ENV [MKDOCS_ENABLE_PLUGIN_RSS, false]
5455
image: "https://cdn.geotribu.fr/img/internal/charte/geotribu_logo_64x64.png"
5556
length: 50
5657
match_path: "(articles|rdp)/.*"
@@ -59,9 +60,12 @@ plugins:
5960
utm_source: "rss-feed"
6061
utm_medium: "RSS"
6162
utm_campaign: "feed-syndication"
62-
- search
63+
- search:
64+
lang: fr
6365
- macros:
6466
include_dir: content/toc_nav_ignored/snippets
67+
- privacy:
68+
download: !ENV [MKDOCS_ENABLE_PLUGIN_PRIVACY, true]
6569
- redirects:
6670
redirect_maps:
6771
# RSS
@@ -196,9 +200,9 @@ extra_javascript:
196200
# Extensions to enhance markdown - see: https://squidfunk.github.io/mkdocs-material/getting-started/#extensions
197201
markdown_extensions:
198202
- abbr
199-
- attr_list
200203
# Admonition - https://squidfunk.github.io/mkdocs-material/extensions/admonition/
201204
- admonition
205+
- attr_list
202206
# Footnotes - https://squidfunk.github.io/mkdocs-material/reference/footnotes/
203207
- footnotes
204208
# Metadata - https://squidfunk.github.io/mkdocs-material/extensions/metadata

requirements-insiders.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Insiders
22
# --------
33

4-
git+https://${GH_TOKEN_MATERIAL_INSIDERS}@github.com/squidfunk/mkdocs-material-insiders.git@8.1.11-insiders-4.8.2#egg=mkdocs-material
4+
git+https://${GH_TOKEN_MATERIAL_INSIDERS}@github.com/squidfunk/mkdocs-material-insiders.git@8.2.1-insiders-4.9.1#egg=mkdocs-material
55
# git+https://${GH_TOKEN_MATERIAL_INSIDERS}@github.com/squidfunk/mkdocs-material-insiders.git
66

77
-r requirements.txt

0 commit comments

Comments
 (0)