...
 
Commits (2)
!docs/
\ No newline at end of file
_book
node_modules
\ No newline at end of file
docs/CONTRIBUTING.md
docs/SUMMARY.md
docs/schemas/
docs/templates/
_book/
node_modules/
\ No newline at end of file
......@@ -39,10 +39,7 @@ Generate files:
before_script:
- pip3 install --requirement requirements.txt
script:
- wget "$CONTRIBUTING_MD_URL"
- mkdir schemas templates
- python3 ./scripts/generate_files_from_schema_catalog.py "$CATALOG_URL" schemas templates
docs.template/SUMMARY.j2 SUMMARY.md
- ./scripts/generate_files.sh
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
......
......@@ -6,10 +6,30 @@ Disponible sur https://scdl.opendatafrance.net/docs
## Développement
Pour travailler sur la documentation en local sur sa machine :
Pour les développeurs, voici comment travailler sur la documentation en local sur sa machine.
Installer des outils nécessaires :
```bash
npm install -g gitbook-cli @opendataschema/table-schema-to-markdown
```
Installer un virtualenv Python contenant les dépendances :
```bash
mkvirtualenv scdl-documentation
pip install --requirement requirements.txt
```
Générer les fichiers non commités :
```bash
./scripts/generate_files.sh
```
Lancer le serveur gitbook :
```bash
npm install gitbook-cli -g
gitbook serve
```
......
#!/bin/bash
CATALOG_URL="${CATALOG_URL:-https://git.opendatafrance.net/scdl/catalog/raw/master/catalog.json}"
CONTRIBUTING_MD_URL="${CONTRIBUTING_MD_URL:-https://git.opendatafrance.net/scdl/catalog/raw/master/CONTRIBUTING.md}"
wget -nc "$CONTRIBUTING_MD_URL" -O docs/CONTRIBUTING.md
mkdir -p docs/schemas docs/templates
python3 ./scripts/generate_files_from_schema_catalog.py "$CATALOG_URL" docs/schemas docs/templates docs_templates/SUMMARY.j2 docs/SUMMARY.md
\ No newline at end of file