Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
a4ecf798
Commit
a4ecf798
authored
8 months ago
by
David Dorchies
Browse files
Options
Downloads
Patches
Plain Diff
docs(css): justify text content
parent
203021af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!275
Release v4.19.0
,
!269
Resolve "RugoFond: rédiger la documentation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/mkdocs-custom.css
+5
-0
5 additions, 0 deletions
docs/mkdocs-custom.css
scripts/mkdocs-postprocess.js
+7
-7
7 additions, 7 deletions
scripts/mkdocs-postprocess.js
with
12 additions
and
7 deletions
docs/m
athjax-scrollbar
.css
→
docs/m
kdocs-custom
.css
+
5
−
0
View file @
a4ecf798
...
@@ -7,3 +7,8 @@
...
@@ -7,3 +7,8 @@
mjx-math
{
mjx-math
{
overflow-y
:
clip
;
overflow-y
:
clip
;
}
}
/* Justified text in documentation content */
.md-content
{
text-align
:
justify
;
}
This diff is collapsed.
Click to expand it.
scripts/mkdocs-postprocess.js
+
7
−
7
View file @
a4ecf798
...
@@ -20,7 +20,7 @@ fs.ensureDirSync(destPath_JS_MJ + "/fonts/HTML-CSS/TeX/", { recursive: true });
...
@@ -20,7 +20,7 @@ fs.ensureDirSync(destPath_JS_MJ + "/fonts/HTML-CSS/TeX/", { recursive: true });
fs
.
copySync
(
"
node_modules/mathjax/es5/tex-mml-chtml.js
"
,
destPath_JS_MJ
+
"
/tex-mml-chtml.js
"
);
fs
.
copySync
(
"
node_modules/mathjax/es5/tex-mml-chtml.js
"
,
destPath_JS_MJ
+
"
/tex-mml-chtml.js
"
);
fs
.
copySync
(
"
node_modules/mathjax/es5/output/chtml/fonts
"
,
destPath_JS_MJ
+
"
/output/chtml/fonts
"
);
fs
.
copySync
(
"
node_modules/mathjax/es5/output/chtml/fonts
"
,
destPath_JS_MJ
+
"
/output/chtml/fonts
"
);
fs
.
copySync
(
"
docs/mathjax.config.js
"
,
destPath_JS
+
"
/mathjax.config.js
"
);
fs
.
copySync
(
"
docs/mathjax.config.js
"
,
destPath_JS
+
"
/mathjax.config.js
"
);
fs
.
copySync
(
"
docs/m
athjax-scrollbar
.css
"
,
destPath_CSS
+
"
/m
athjax-scrollbar
.css
"
);
fs
.
copySync
(
"
docs/m
kdocs-custom
.css
"
,
destPath_CSS
+
"
/m
kdocs-custom
.css
"
);
fs
.
copySync
(
"
docs/matomo-tracking.js
"
,
destPath_JS
+
"
/matomo-tracking.js
"
);
fs
.
copySync
(
"
docs/matomo-tracking.js
"
,
destPath_JS
+
"
/matomo-tracking.js
"
);
fs
.
copySync
(
"
node_modules/mermaid/dist/mermaid.min.js
"
,
destPath_JS
+
"
/mermaid.min.js
"
);
fs
.
copySync
(
"
node_modules/mermaid/dist/mermaid.min.js
"
,
destPath_JS
+
"
/mermaid.min.js
"
);
fs
.
copySync
(
"
node_modules/mermaid/dist/mermaid.min.js.map
"
,
destPath_JS
+
"
/mermaid.min.js.map
"
);
fs
.
copySync
(
"
node_modules/mermaid/dist/mermaid.min.js.map
"
,
destPath_JS
+
"
/mermaid.min.js.map
"
);
...
@@ -30,15 +30,15 @@ Ici, on veut que les ressources copiées ci dessus soit accessibles.
...
@@ -30,15 +30,15 @@ Ici, on veut que les ressources copiées ci dessus soit accessibles.
mkdocs-xx.yml :
mkdocs-xx.yml :
extra_css:
extra_css:
- ../stylesheets/m
athjax-scrollbar
.css
- ../stylesheets/m
kdocs-custom
.css
Fichiers HTML générés :
Fichiers HTML générés :
Par ex src/assets/docs/fr/calculators/maths/solver.html contient <link rel="stylesheet" href="../../stylesheets/m
athjax-scrollbar
.css">
Par ex src/assets/docs/fr/calculators/maths/solver.html contient <link rel="stylesheet" href="../../stylesheets/m
kdocs-custom
.css">
ce qui fait référence à stylesheets dans src/assets/docs/fr alors qu'on veut référencer stylesheets dans src/assets/docs/
ce qui fait référence à stylesheets dans src/assets/docs/fr alors qu'on veut référencer stylesheets dans src/assets/docs/
(le chemin généré dépend de l'emplacement du fichier le contenant).
(le chemin généré dépend de l'emplacement du fichier le contenant).
Le problème, c'est que si on modifie extra_css avec ../../stylesheets/m
athjax-scrollbar
.css, cela génère la même chose
Le problème, c'est que si on modifie extra_css avec ../../stylesheets/m
kdocs-custom
.css, cela génère la même chose
(href="../../stylesheets/m
athjax-scrollbar
.css") vraisemblablement à cause de site_dir (=docs/fr) qui limite les "remontées"
(href="../../stylesheets/m
kdocs-custom
.css") vraisemblablement à cause de site_dir (=docs/fr) qui limite les "remontées"
de niveau de répertoire.
de niveau de répertoire.
La solution est donc de modifier les fichiers HTML générés pour ajouter ../ dans href="...".
La solution est donc de modifier les fichiers HTML générés pour ajouter ../ dans href="...".
...
@@ -75,8 +75,8 @@ function replaceHtml(base_dir, s1, s2) {
...
@@ -75,8 +75,8 @@ function replaceHtml(base_dir, s1, s2) {
execBashCmd
(
cmd
);
execBashCmd
(
cmd
);
}
}
replaceHtml
(
"
src/assets/docs/fr/
"
,
"
../../stylesheets/m
athjax-scrollbar
.css
"
,
"
../../../stylesheets/m
athjax-scrollbar
.css
"
);
replaceHtml
(
"
src/assets/docs/fr/
"
,
"
../../stylesheets/m
kdocs-custom
.css
"
,
"
../../../stylesheets/m
kdocs-custom
.css
"
);
replaceHtml
(
"
src/assets/docs/en/
"
,
"
../../stylesheets/m
athjax-scrollbar
.css
"
,
"
../../../stylesheets/m
athjax-scrollbar
.css
"
);
replaceHtml
(
"
src/assets/docs/en/
"
,
"
../../stylesheets/m
kdocs-custom
.css
"
,
"
../../../stylesheets/m
kdocs-custom
.css
"
);
replaceHtml
(
"
src/assets/docs/fr/
"
,
"
../../javascripts/mathjax.config.js
"
,
"
../../../javascripts/mathjax.config.js
"
);
replaceHtml
(
"
src/assets/docs/fr/
"
,
"
../../javascripts/mathjax.config.js
"
,
"
../../../javascripts/mathjax.config.js
"
);
replaceHtml
(
"
src/assets/docs/en/
"
,
"
../../javascripts/mathjax.config.js
"
,
"
../../../javascripts/mathjax.config.js
"
);
replaceHtml
(
"
src/assets/docs/en/
"
,
"
../../javascripts/mathjax.config.js
"
,
"
../../../javascripts/mathjax.config.js
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment