-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1d9fa1
commit 117655e
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
# transport-normes-site | ||
Ce repo est le code Hugo permettant de déployer le contenu de https://github.com/etalab/transport-normes en tant que site internet. | ||
|
||
Le site est déployé sur https://normes.transport.data.gouv.fr/. | ||
Le site est déployé sur https://normes.transport.data.gouv.fr | ||
|
||
|
||
## Développement local | ||
|
||
En local, après [avoir installé Hugo](https://gohugo.io/installation/), exécuter les commandes suivantes | ||
|
||
```sh | ||
git submodule update --init --recursive | ||
hugo server | ||
``` | ||
|
||
## Commande de déploiement | ||
|
||
La commande utilisée pour déployer le site sur Netlify est la suivante : | ||
|
||
`git submodule update --init --remote content/posts && hugo --minify` | ||
`git submodule update --init --remote content/normes && hugo --minify` | ||
|
||
On initialise uniquement le submodule souhaité (le contenu des normes, pas le thème Hugo !), en passant l'option `--remote` pour aller lire la dernière version sur le repo en question. | ||
|
||
Un commit sur la branche principale de https://github.com/etalab/transport-normes déclenche un redéploiement du site via une Github Action sur le repo du contenu (via une requête POST sur Netlify). | ||
Un commit sur la branche principale de https://github.com/etalab/transport-normes déclenche un redéploiement du site via [une Github Action](https://github.com/etalab/transport-normes/blob/main/.github/workflows/github-actions.yml) sur le repo du contenu (via une requête POST sur Netlify). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- /* Matomo tracking code */}} | ||
<script type="text/javascript"> | ||
var _paq = _paq || []; | ||
_paq.push(["setCookieDomain", "*.transport.data.gouv.fr"]); | ||
_paq.push(["setDomains", "*.transport.data.gouv.fr"]); | ||
_paq.push(["trackPageView"]); | ||
_paq.push(["enableLinkTracking"]); | ||
(function() { | ||
var u="//stats.data.gouv.fr/"; | ||
_paq.push(["setTrackerUrl", u+"matomo.php"]); | ||
_paq.push(["setSiteId", "58"]); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName("script")[0]; | ||
g.type="text/javascript"; g.async=true; g.defer=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s); | ||
})(); | ||
</script> | ||
{{- /* end Matomo tracking code */}} |