MaJ du 04-02-2021

This commit is contained in:
2021-02-04 09:55:26 +01:00
parent 84b4e1a85d
commit fb07a20b0c
56 changed files with 4962 additions and 95 deletions

View File

@@ -76,7 +76,7 @@ $ pip3 --no-cache-dir install mkdocs
## Environnement virtuel:
Création de l'environnement virtuel pour l'application MkDocs:
```bash
# Création de l'environnement virtuel
@@ -90,27 +90,41 @@ $ mkdocs_env/bin/pip3 install mkdocs
# Installation du thème
$ mkdocs_env/bin/pip3 install mkdocs-material pymdown-extensions pygments
# Installation des plugins
$ mkdocs_env/bin/pip3 install mkdocs-pdf-export-plugin mkdocs-minify-plugin
$ mkdocs_env/bin/pip3 install mkdocs-pdf-export-plugin mkdocs-minify-plugin mkdocs-pdf-export-plugin
# Installation du plugin depuis les sources
$ mkdocs_env/bin/pip3 install mkdocs-pdf-export-plugin-0.5.5.tar.gz
# $ mkdocs_env/bin/pip3 install mkdocs-pdf-export-plugin-0.5.5.tar.gz
# Mise-à-jour
$ mkdocs_env/bin/pip3 install -U mkdocs
# Mise-à-jour de l'environnement virtuel
$ python3 -m venv --upgrade mkdocs_env
up_venv() {
/Users/bruno/Documents/venv/$1/bin/python3 -m venv --upgrade $1
}
$ up_venv mkdocs
# Mise-à-jour de l'application dans un venv
up_venv_mod() {
pip_venv="/Users/bruno/Documents/venv/$1/bin/pip3"
$pip_venv list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip_venv install -U
}
$ up_venv_mod mkdocs
```
Initialisation et démarrage de MkDocs:
```bash
~/Documents/mydocs master*
~/Documents/docs master*
# Création d'un nouveau projet
$ ~/Documents/mkdocs_env/bin/mkdocs new
$ ~/Documents/venv/mkdocs/bin/mkdocs new ~/Documents/docs
INFO - Writing config file: /Users/bruno/Documents/docs/mkdocs.yml
INFO - Writing initial docs: /Users/bruno/Documents/docs/docs/index.md
# Démarrage de mkdocs
$ ~/Documents/mkdocs_env/bin/mkdocs serve
$ ~/Documents/venv/mkdocs/bin/mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
```
@@ -128,6 +142,16 @@ mkdocs_env mkdocs serve
mkdocs_env deactivate
```
Mise-à-jour des modules:
```bash
up_venv_mod() {
/Users/bruno/Documents/venv/$1/bin/pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
}
$ up_venv mkdocs_env
```
## Modules:
@@ -437,6 +461,13 @@ $ pip3 show mkdocs | grep Requires
Requires: click, Markdown, PyYAML, Jinja2, tornado, lunr, livereload
```
#### Vérifier les paquets installés:
```bash
$ pip3 check
mkdocs 1.1.2 has requirement lunr[languages]==0.5.8, but you have lunr 0.5.9.
```
#### pipdeptree:
@@ -474,3 +505,11 @@ mkdocs==1.1
- tornado [required: >=5.0, installed: 6.0.4]
```
## Configuration:
```bash
$ pip3 config edit
```