Skip to content

Commit 2a4fcb1

Browse files
author
haarer
committed
add description and files for local document generation using docker and vscode
1 parent 0b2c88c commit 2a4fcb1

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Create a Jekyll container for GitHub Pages
2+
# See this for current supported versions: https://pages.github.com/versions/
3+
FROM ruby:3.3
4+
5+
# Update the Ruby bundler
6+
RUN gem update bundler
7+
8+
# Install Jekyll
9+
RUN gem install bundler jekyll

.devcontainer/devcontainer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// See https://containers.dev/implementors/json_reference/ for configuration reference
2+
{
3+
"name": "SAF Documentation",
4+
"dockerFile": "DockerFile",
5+
"forwardPorts": [4000, 35729],
6+
"runArgs": ["--name","SAF_docgen_devcontainer"],
7+
"postStartCommand": "bundle install && bundle exec jekyll serve --baseurl='' --livereload --force_polling"
8+
}

src/devdoc/docgen.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,27 @@ The SAF Specification is generated into HTML pages from a model. The generation
1414
## Github Workflow on SAF Specification Repository
1515
The SAF Specification repository contains a workflow which generates the HTML pages from the JSON and markdown files. It is triggered by commits to the Specification repository.
1616

17-
## local document generation (setup)
17+
## Local document generation using docker and vs-code
18+
* [install git](https://git-scm.com/downloads)
19+
* install wsl 2 (no distro)
20+
21+
in a powershell
22+
```
23+
wsl --install --no-distro
24+
```
25+
* [install docker desktop](https://docs.docker.com/desktop/setup/install/windows-install/) (a WSL2 based installation)
26+
* clone the SAF Specification repository to your machine
27+
```
28+
git clone https://github.com/GfSE/SAF-Specification.git
29+
```
30+
* [install vs-code](https://code.visualstudio.com/download)
31+
* open repo with vs code. Vscode will advise to install some extensions, please follow those recommendations for vscode extensions.
32+
Finally this will create the container image and run it.
33+
the SAF documentation is available at localhost:4000
34+
35+
## Local document generation (manual setup)
36+
### setting up local document generation
37+
* [install git](https://git-scm.com/downloads)
1838
* clone the SAF Specification repository to your machine
1939
2040
```
@@ -28,7 +48,7 @@ The SAF Specification repository contains a workflow which generates the HTML pa
2848
export PATH="~/.local/share/gem/ruby/3.2.0/bin/:$PATH"
2949
export BUNDLE_PATH="~/.local/share/gem/ruby/3.2.0/gems/"
3050
```
31-
## local document generation (running)
51+
### running local document generation
3252
Run the document generation starting a local web server and open the saf documentation locally
3353
* in the cloned repository dir, start the generation
3454
```

0 commit comments

Comments
 (0)