Skip to content

Commit cb6dbb9

Browse files
authored
Initialize githubactions-moves
0 parents  commit cb6dbb9

16 files changed

+1185
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#on:
2+
# workflow_dispatch:
3+
# schedule:
4+
# - cron: '0 6 * * 1'
5+
#
6+
#name: Check links
7+
#jobs:
8+
# link-checker:
9+
# name: Check links
10+
# runs-on: ubuntu-22.04
11+
# steps:
12+
# - uses: actions/checkout@v4
13+
# - run: echo '/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin' >> $GITHUB_PATH
14+
# - run: brew install muffet
15+
# - name: Check
16+
# run: >
17+
# muffet
18+
# --header 'user-agent:Curl'
19+
# --ignore-fragments
20+
# --json
21+
# --accepted-status-codes 200..300,301,403,429
22+
# --buffer-size 8192
23+
# https://gitdocumentatie.logius.nl/publicatie/scripts/paths.html
24+
# > muffet.json
25+
# continue-on-error: true
26+
# - name: Report
27+
# run: python ./scripts/muffet-json.py
28+
# - name: Send mail
29+
# uses: dawidd6/action-send-mail@v3
30+
# with:
31+
# server_address: smtp.gmail.com
32+
# server_port: 465
33+
# secure: true
34+
# username: ${{secrets.MAIL_USERNAME}}
35+
# password: ${{secrets.MAIL_PASSWORD}}
36+
# subject: Broken links on gitdocumentatie
37+
# to: ${{secrets.MAIL_RECIPIENTS}}
38+
# from: Standaarden Bot
39+
# html_body: file://links.md
40+
# ignore_cert: true
41+
# convert_markdown: true

.github/workflows/build.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build
2+
on:
3+
workflow_call:
4+
jobs:
5+
main:
6+
name: HTML
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- run: mkdir ~/static
10+
- name: Cache HTML
11+
uses: actions/cache@v3
12+
with:
13+
path: ~/static
14+
key: ${{ github.run_id }}
15+
- uses: actions/checkout@v3
16+
- name: Static HTML
17+
run: |
18+
npx respec --localhost --src index.html --out ~/static/snapshot.html

.github/workflows/check.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
\name: Check
2+
on:
3+
workflow_call:
4+
jobs:
5+
wcag:
6+
name: WCAG
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Recover HTML
11+
uses: actions/cache@v4
12+
with:
13+
path: ~/static
14+
key: ${{ github.run_id }}
15+
- run: mv ~/static/snapshot.html snapshot.html
16+
- run: npm install -g pa11y
17+
- run: pa11y snapshot.html --ignore WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
18+
19+
links:
20+
name: Links
21+
runs-on: ubuntu-22.04
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Recover HTML
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/static
28+
key: ${{ github.run_id }}
29+
- run: mv ~/static/snapshot.html snapshot.html
30+
- name: Serve Files
31+
uses: Eun/http-server-action@v1
32+
with:
33+
content-types: |
34+
{
35+
"css": "text/css",
36+
"html": "text/html",
37+
"ico": "image/x-icon",
38+
"jpeg": "image/jpeg",
39+
"jpg": "image/jpeg",
40+
"js": "text/javascript",
41+
"json": "application/json",
42+
"png": "image/png",
43+
"svg": "image/svg+xml",
44+
"txt": "text/plain",
45+
"xml": "text/xml"
46+
}
47+
- run: echo '/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin' >> $GITHUB_PATH
48+
- name: Install muffet
49+
run: brew install muffet
50+
- name: Check links
51+
run: >
52+
muffet
53+
--exclude '8080\/\S*\.pdf'
54+
--exclude '^https:\/\/gitdocumentatie.*(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?'
55+
--header 'user-agent:Curl' --ignore-fragments --one-page-only http://localhost:8080/snapshot.html
56+
--buffer-size 8192

.github/workflows/publish.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
release:
7+
name: Release
8+
runs-on: ubuntu-22.04
9+
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Recover HTML
13+
uses: actions/cache@v4
14+
with:
15+
path: ~/static
16+
key: ${{ github.run_id }}
17+
- name: Gather files
18+
run: |
19+
rm -f *.md *.html
20+
mv ~/static/* ./
21+
mv snapshot.html index.html
22+
mkdir content
23+
shopt -s extglob
24+
mv !(content) content
25+
- name: Commit release
26+
run: |
27+
git add -A
28+
git config user.name "GitHub Action"
29+
git config user.email "[email protected]"
30+
git diff-index --quiet HEAD || git commit -m "Automated Release"
31+
git push
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
permissions:
36+
pages: write
37+
id-token: write
38+
environment:
39+
name: github-pages
40+
runs-on: ubuntu-22.04
41+
needs: release
42+
steps:
43+
- name: Deploy
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*_log

LICENSE

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The W3C SOFTWARE NOTICE AND LICENSE (W3C)
2+
3+
https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
4+
5+
This work is being provided by the copyright holders under the following license. By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
6+
7+
Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
8+
1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
9+
2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice (https://www.w3.org/Consortium/Legal/2015/copyright-software-short-notice.html) should be included.
10+
3. Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)."
11+
12+
13+
THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
14+
15+
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
16+
17+
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders.

README.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
## ReSpec template instructies
2+
3+
ReSpec is een tool om html en pdf documenten te genereren op basis van markdown content.
4+
5+
Gebruik de knop [_Use this template_](https://github.com/Geonovum/NL-ReSpec-GN-template/generate) om aan de slag te gaan. Dit maakt een kopie van de template in uw eigen GitHub repository die dan aangepast en uitgebreid kan worden.
6+
7+
De dynamische pagina is van het template document [hier](https://geonovum.github.io/NL-ReSpec-GN-template/) te zien.
8+
9+
Deze repository bevat ook de GitHub Workflows om een statische HTML-pagina en PDF-document te genereren en enkele controles uit te voeren. Deze workflows worden automatisch gerund zodra er een aanpassing gedaan wordt aan de main branch.
10+
11+
### Vereiste voor gebruik
12+
- Kennis van git/github
13+
- Kennis van markdown en/of HTML
14+
- Een webserver om de documentatie te hosten
15+
16+
### Gebruikersinstructie
17+
Om het gebruik van dit template makkelijker te maken raden we het aan om een IDE te gebruiken. Die geeft een voorbeeld van hoe de markdown eruit zal zien, kan laten zien of de config files nog in de correcte vorm zijn en kan helpen in het gebruik van git.
18+
Een gratis voorbeeld van een IDE is: [Visual studio code](https://code.visualstudio.com/).
19+
20+
Aanpassingen maken aan het document gaat op 2 manieren:
21+
- De configuratie van het document aanpassing in de config files
22+
- Markdown files toevoegen/veranderen
23+
- Plaatsen waar de template ingevuld moeten worden zijn gemarkeerd met 'TODO:'.
24+
25+
De **configuratie files** bevatten informatie over de organisatie en over
26+
de status van het document. Bekijk de [Logius ReSpec wiki](https://github.com/Logius-standaarden/respec/wiki)
27+
voor meer informatie over de configuratie opties. De files zijn gesplitst in 2 files:
28+
[organisation-config.js](https://github.com/Geonovum/NL-ReSpec-GN-beheer/tree/9a606242041171dbf507c439863e4ffb94701463/js) en [config.js](js/config.js).
29+
Deze laatste is te vinden in de `js` folder.
30+
31+
De organisation_config bevat informatie over de organisatie, de informatie in deze file
32+
zal bijna nooit veranderen zoals de naam van de organisatie. Het wordt aangeraden de file
33+
zelf te hosten zodat hij in alle documentatie van de organisatie gebruikt kan worden en
34+
niet elke keer gekopieerd hoeft te worden. Geonovum host dit file onder de naam `geonovum-config.js` op https://tools.geostandaarden.nl/respec/config, zodat deze configuratie centraal ingevuld is en hergebruikt kan worden.
35+
36+
De document_config in [config.js](js/config.js) bevat informatie die alleen relevant is voor het huidige document. Hier kun je instellingen regelen voor het document dat je gaat schrijven, zoals documenttype, status, auteurs, etc.
37+
38+
Beide configuratie bestanden worden gelinkt in de `index.html` file.
39+
40+
**Markdown files** bevatten de content van het document. Alle content
41+
kan in 1 document, maar het is aan te raden om de content te splitsen
42+
in verschillende files, bijvoorbeeld per hoofdstuk, met een toepasselijke naam om onderhoud
43+
makkelijker te maken. HTML is overigens ook mogelijk.
44+
45+
Na het toevoegen van een nieuwe markdown file moet hij toegevoegd worden
46+
aan de [index.html](index.html). Je voegt hem toe door de naam en eventueel relevante CSS class
47+
toe te voegen aan de lijst met "data includes":
48+
49+
<pre>
50+
&lt;section data-include-format="markdown" data-include="ch01.md" class="informative">&lt;/section>
51+
&lt;section data-include-format="markdown" data-include="ch02.md">&lt;/section>
52+
</pre>
53+
54+
Dat wil zeggen, voeg een `<section>` toe met op de plaats van "ch01.md" de naam van het bestand.
55+
56+
Voor een volledige lijst van CSS classes zie de [ReSpec Documentation](https://respec.org/docs/#css-classes)
57+
58+
Deze classes zijn ook binnen de markdown files te gebruiken op de volgende manier:
59+
```<div class="example">voorbeeld</div>```
60+
61+
### Automatische controles
62+
Bij het uploaden van een nieuwe versie naar github worden er via github actions 2 controles
63+
uitgevoerd:
64+
65+
Een WCAG-check (Web Content Accessibility Guidelines), deze guidelines
66+
gemaakt door W3C zorgen voor een verbetering van de toegankelijkheid
67+
van webapplicaties verbeterd voor zowel verschillende apparaten
68+
als voor mensen met een beperking.
69+
70+
Een link-check, deze check controleert of alle links die in het
71+
document staan ook naar iets wijzen.
72+
73+
outputs van deze tests zijn te vinden in het tabblad `Actions` in de GitHub repository.
74+
75+
### Publiceren van documenten
76+
Na een update in de main branch wordt er een statische HTML en een PDF-versie gemaakt.
77+
Dit zijn `snapshot.html` en `template.pdf` deze bestanden zijn te vinden in de root file van het project. Deze files kunnen daarna gepubliceerd worden.
78+
De PDF-versie wordt aangemaakt indien `alternateFormats` in `config.js` geconfigureerd staat:
79+
```js
80+
alternateFormats: [
81+
{
82+
label: "pdf",
83+
uri: "template.pdf",
84+
},
85+
]
86+
```
87+
88+
### Transitie van 'oude' Geonovum ReSpec naar NL-ReSpec van Logius
89+
90+
Hieronder staan de instructies voor gebruikers van Geonovum ReSpec die willen overstappen naar de nieuwe NL-ReSpec.
91+
92+
Als je een gepubliceerd document wilt omzetten naar de nieuwe ReSpec:
93+
- Dit hoeft niet. Eenmaal op docs gepubliceerde documenten hoeven niet aangepast te worden.
94+
95+
Als je een bestaand werkdocument wilt omzetten naar de nieuwe ReSpec:
96+
- Pas de `<head>` van index.html aan. Wat er in moet staan kun je afkijken in [template index.html](https://github.com/Geonovum/NL-ReSpec-GN-template/blob/main/index.html). Het is belangrijk dat je in ieder geval de link naar `geonovum-config.js`, `respec-nlgov.js`, en `Geonovum.ico` overneemt. Vraag eventueel hulp aan de ReSpec beheerders.
97+
- Pas in `config.js` de `specStatus aan. De afkortingen zijn veranderd (!):
98+
- `wv` of `WV` = Werkversie
99+
- `cv` of `CV` = Consultatieversie
100+
- `vv` of `VV` = Versie ter vaststelling
101+
- `def` of `DEF` = Vastgestelde versie
102+
- `basis` of `BASIS` = Basis Document
103+
- Pas in `config.js` de `title` aan. Dit is een nieuwe config optie. De hoofdtitel van je document zet je voortaan in `config.js` in plaats van bovenin `index.html`. Voorbeeld:
104+
105+
`title: "Informatiemodel Golf",`
106+
107+
Als je een nieuw werkdocument gaat maken:
108+
- gebruik de [template](https://github.com/Geonovum/NL-ReSpec-GN-template). Klik op `Use this template` en kies `Create a new repository`. Er wordt dan een nieuwe repository (dat al wel aangemaakt moet zijn) ingericht op basis van de nieuwe respec, waarmee je direct aan de slag kunt. Pas in `config.js` de titel van je document aan zoals hierboven beschreven. Neem contact op met een van de github beheerders als je zelf geen github repository kan aanmaken.

abstract.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: vul in abstract.md een abstract in.

ch01.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Niet-normatieve deel
2+
3+
Bijvoorbeeld een introductie is niet normatief.
4+
5+
<p class="note" title="index">
6+
Dit hoofdstuk is toegevoegd met `class="informative"` in `config.js`.
7+
</p>
8+
9+
## Een subparagraaf
10+
11+
| Sleutel | Waarde |
12+
| ------- | ------ |
13+
| key | value |
14+

ch02.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Meer inhoud
2+
3+
## Definities
4+
<dfn>Definitie</dfn>: Een definitie is een beschrijving van een woord. Een ander woord voor _definitie_ is betekenis of beschrijving.
5+
6+
## Afbeeldingen
7+
8+
Afbeeldingen krijgen een nummer en vermelding in de figurenlijst [[[#tof]]].
9+
10+
![Tekstueel alternatief voor toegankelijkheid](media/Bomos_levenscyclus.svg "Onderschrift")
11+
12+
## Referenties
13+
14+
Referenties kunnen op drie plaatsen staan:
15+
16+
- In SpecRef [Specref](https://www.specref.org/)
17+
- In de organisatie configuraties [[SemVer]]. Deze zijn te vinden op [tools.geostandaarden.nl](https://github.com/Geonovum/tools.geostandaarden.nl/blob/main/tools.geostandaarden.nl/respec/config/geonovum-config.js).
18+
- In het document, zoals [[MIM12]]. Deze zijn te vinden in `js/config.js`.
19+
20+
Referentie uit organisatie lijst [[SemVer]] of de locale lijst [[MIM12]]. Lijst staat in `organisation-config.js`. Alleen referenties die in de tekst voorkomen worden getoond.
21+
22+
We gebruiken een <a>definitie</a> om een woord te omschrijven.
23+
24+
## Optioneel
25+
26+
De onderstaande secties (_Conformiteit_ e.d.) zijn optioneel, zie `index.html`:
27+
28+
```
29+
<body>
30+
<section id="abstract" data-include-format="markdown" data-include="abstract.md"></section>
31+
<section id="sotd"></section><!-- Wordt automatisch gevuld -->
32+
<section data-include-format="markdown" class="informative" data-include="ch01.md"></section>
33+
<section data-include-format="markdown" data-include="ch02.md"></section>
34+
<!-- Hieronder optionele secties. Worden automatisch gevuld -->
35+
<section id='conformance'></section>
36+
<section id='tof'></section>
37+
<section id="index"></section>
38+
</body>
39+
```

index.html

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html lang="nl">
3+
4+
<head>
5+
<meta content="text/html; charset=utf-8" http-equiv="content-type">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<script src="https://cdn.jsdelivr.net/gh/digitalbazaar/[email protected]/dist/main.js" class="remove"></script>
8+
<script src="https://tools.geostandaarden.nl/respec/config/geonovum-config.js" class="remove"></script>
9+
<script src="js/config.js" class="remove"></script>
10+
<script class="remove">
11+
respecConfig.localBiblio = Object.assign(organisationConfig.localBiblio,respecConfig.localBiblio);
12+
respecConfig = {...organisationConfig, ...respecConfig};
13+
</script>
14+
<script>document.title = respecConfig.title</script>
15+
<title>TODO: Vul hier de titel in</title>
16+
<link rel="shortcut icon" type="image/x-icon" href="https://tools.geostandaarden.nl/respec/style/logos/Geonovum.ico" />
17+
<script src="https://gitdocumentatie.logius.nl/publicatie/respec/builds/respec-nlgov.js" class="remove" async></script>
18+
<!-- De volgende regel zorgt ervoor dat plaatjes uit Imvertor niet geschaald
19+
worden, zodat de imagemap die op deze plaatjes zit werkt. -->
20+
<style>div.imageinfo img {max-width: none;}</style>
21+
</head>
22+
23+
<body>
24+
<section id="abstract" data-include-format="markdown" data-include="abstract.md"></section>
25+
<section id="sotd"></section><!-- Wordt automatisch gevuld -->
26+
27+
<!-- TODO: voeg hier je eigen hoofdstukken toe -->
28+
<section data-include-format="markdown" data-include="ch01.md" class="informative"></section>
29+
<section data-include-format="markdown" data-include="ch02.md"></section>
30+
<section data-include-format="markdown" data-include="mermaid.md"></section>
31+
32+
<!-- Als je document een door imvertor gegenereerde catalogus bevat kan je die -->
33+
<!-- opnemen door de volgende regel uit commentaarhaakjes te halen en aan te passen -->
34+
<!-- <div id="catalogus" data-include="data/TODO-cat.respec.html" data-include-replace=true></div> -->
35+
36+
<!-- De volgende paragrafen worden automatisch gevuld. Je kunt ze uitzetten -->
37+
<section id='conformance'></section> <!-- Gegeneerd hoofdstuk over conformiteit-->
38+
<section id='tof'></section><!-- Lijst van figuren -->
39+
<section id="index"></section><!-- Lijst van begrippen -->
40+
</body>
41+
42+
</html>

0 commit comments

Comments
 (0)