Skip to content

Commit

Permalink
Push new documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jun 5, 2023
1 parent f8dd4a4 commit f21eefb
Show file tree
Hide file tree
Showing 127 changed files with 3,005 additions and 5,354 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ jobs:
submodules: true
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.68.3'
# extended: true

- name: Build
run: hugo --minify
run: ./build.sh --update

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./site
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/public
/site
/.venv
33 changes: 0 additions & 33 deletions Makefile

This file was deleted.

21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
QWC Site
========
QWC2 Documentation
==================

Homepage and documentation of QWC2 and QWC Services.
Work in progress.

Build
=====

Development
-----------
Full build, fetching the service configuration schemas and plugin reference:

Requires [Hugo](https://gohugo.io/).
./build.sh --update

Get site code:
Build using previously downloaded service configuration schemas and plugin reference:

git clone --recursive https://github.com/qwc-services/qwc-services.github.io.git

Run Hugo:

hugo serve
./build.sh
6 changes: 0 additions & 6 deletions archetypes/default.md

This file was deleted.

46 changes: 46 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh

echo "* Setting up venv..."
rm -rf .venv
python3 -mvenv .venv
source .venv/bin/activate
pip install -r requirements.txt

if [ "$1" == "--update" ]; then
echo "# References" > src/references/index.md
echo "" >> src/references/index.md

echo "* Downloading plugin reference..."
wget -q -O src/references/qwc2_plugins.md https://raw.githubusercontent.com/qgis/qwc2-demo-app/master/doc/src/plugins.md
echo "* [QWC2 plugins](qwc2_plugins.md)" >> src/references/index.md

mkdir -p tmp
echo "* Downloading schema versions..."
wget -q -O tmp/schema-versions-master.json https://github.com/qwc-services/qwc-config-generator/raw/master/schemas/schema-versions-master.json

for schemaUrl in \
https://github.com/qwc-services/qwc-config-generator/raw/master/schemas/qwc-config-generator.json \
$(cat tmp/schema-versions-master.json | grep schema_url | awk -F'"' '{print $4}');
do
service=$(basename ${schemaUrl%.json})
echo "* Generating service schema reference for $service..."
echo $schemaUrl
wget -q -O tmp/$service.json $schemaUrl
generate-schema-doc tmp/$service.json src/references/$service.md

echo "* [$service]($service.md)" >> src/references/index.md

done
rm -rf tmp
fi

echo "* Clean previous HTML build..."
rm -rf site

echo "* Building HTML..."
mkdocs build -f qwc2.yml

# cleanup venv
echo "* Clean venv..."
deactivate
rm -rf .venv
17 changes: 0 additions & 17 deletions config.toml

This file was deleted.

46 changes: 0 additions & 46 deletions content/_index.md

This file was deleted.

115 changes: 0 additions & 115 deletions content/overview/_index.en.md

This file was deleted.

Loading

0 comments on commit f21eefb

Please sign in to comment.