Skip to content

Commit ecf7b4f

Browse files
authored
Merge pull request #3 from tintou/main
Allow v3 and v4 in the same time
2 parents f2db33f + 246ede6 commit ecf7b4f

26 files changed

Lines changed: 572 additions & 28 deletions

.github/workflows/main.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- main
77

88
env:
9-
LATEST_VERSION: 3.0.20
9+
LATEST_VERSION_3: 3.0.20
10+
LATEST_VERSION_4: master
1011

1112
jobs:
1213
build:
@@ -20,38 +21,58 @@ jobs:
2021
env:
2122
GH_TOKEN: ${{ github.token }}
2223
run: |
23-
sed -i "s#@version@#v${{ env.LATEST_VERSION }}#g" content/_index.md
24+
sed -i "s#@version_3@#v${{ env.LATEST_VERSION_3 }}#g" content/_index.md
25+
sed -i "s#@version_4@#${{ env.LATEST_VERSION_4 }}#g" content/_index.md
2426
export GITHUB_PAGES_URL=$(gh api "repos/${{ github.repository }}/pages" --jq '.html_url')
2527
sed -i "s#https:\/\/libical\.github\.io#${GITHUB_PAGES_URL}#g" config.toml
2628
export GITHUB_CODE_WEBSITE="${{ github.server_url }}/${{ github.repository }}"
2729
sed -i "s#https:\/\/github.com\/libical\/libical.github.io#${GITHUB_CODE_WEBSITE}#g" config.toml
2830
- name: Build website
29-
uses: shalzz/zola-deploy-action@v0.19.2
31+
uses: shalzz/zola-deploy-action@v0.22.1
3032
env:
3133
BUILD_ONLY: true
32-
- name: Checkout libical v${{ env.LATEST_VERSION }}
34+
- name: Checkout libical v3 v${{ env.LATEST_VERSION_3 }}
3335
uses: actions/checkout@v4
3436
with:
3537
repository: libical/libical
36-
ref: v${{ env.LATEST_VERSION }}
37-
path: libical-sources
38+
ref: v${{ env.LATEST_VERSION_3 }}
39+
path: libical3-sources
40+
- name: Checkout libical v4 ${{ env.LATEST_VERSION_4 }}
41+
uses: actions/checkout@v4
42+
with:
43+
repository: libical/libical
44+
ref: ${{ env.LATEST_VERSION_4 }}
45+
path: libical4-sources
3846
- name: Install dependencies
39-
run: sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev cmake ninja-build doxygen graphviz
40-
- name: Configure libical
47+
run: sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev cmake ninja-build doxygen graphviz gi-docgen
48+
- name: Configure libical v3
4149
run: |
42-
cd libical-sources
50+
cd libical3-sources
4351
mkdir build
4452
cmake -B build -G Ninja -DENABLE_GTK_DOC=True -DICAL_GLIB=True -DGOBJECT_INTROSPECTION=True -DICAL_BUILD_DOCS=True
45-
- name: Build libical documentation
53+
- name: Build libical v3 documentation
4654
run: |
47-
cd libical-sources
55+
cd libical3-sources
4856
cmake --build build --target docs
57+
- name: Configure libical v4
58+
run: |
59+
cd libical4-sources
60+
mkdir build
61+
cmake -B build -G Ninja -DLIBICAL_GLIB_BUILD_DOCS=True -DLIBICAL_GLIB=True -DLIBICAL_GOBJECT_INTROSPECTION=True -DLIBICAL_BUILD_DOCS=True -DLIBICAL_JAVA_BINDINGS=False
62+
- name: Build libical v4 documentation
63+
run: |
64+
cd libical4-sources
65+
cmake --build build --target docs libical-glib-doc
4966
- name: Move Documentation
5067
run: |
51-
sudo rm -R public/docs/developer/libical
52-
sudo mv libical-sources/build/apidocs/html public/docs/developer/libical
53-
sudo rm -R public/docs/developer/libical-glib
54-
sudo mv public/libical-glib public/docs/developer/libical-glib
68+
sudo rm -R public/docs/v3/libical
69+
sudo mv libical3-sources/build/apidocs/html public/docs/v3/libical
70+
sudo rm -R public/docs/v3/libical-glib
71+
sudo mv public/libical-glib public/docs/v3/libical-glib
72+
sudo rm -R public/docs/v4/libical
73+
sudo mv libical4-sources/build/apidocs/html public/docs/v4/libical
74+
sudo rm -R public/docs/v4/libical-glib
75+
sudo mv libical4-sources/build/docs/reference/libical-glib/libical-glib public/docs/v4/libical-glib
5576
- name: Upload Artifact
5677
uses: actions/upload-pages-artifact@v3
5778
with:

config.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ build_search_index = true
1111

1212
theme = "adidoks"
1313

14-
[markdown]
15-
# Whether to do syntax highlighting
16-
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
17-
highlight_code = true
18-
1914
[extra]
2015
# Put all your custom variables here
2116
edit_page = false

content/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ title = "The iCalendar library"
77
lead = '<b>libical</b> is an Open Source implementation of the iCalendar protocols and protocol data units.'
88
url = "/docs/getting-started/introduction/"
99
url_button = "Get started"
10-
repo_version = "@version@"
10+
repo_version = "@version_3@ and @version_4@"
1111
repo_license = "MPL v2.0 or LGPL v2.1 —"
1212
repo_url = "https://github.com/libical/libical/"
1313

1414
# Menu items
1515
[[extra.menu.main]]
1616
name = "Docs"
1717
section = "docs"
18-
url = "/docs/getting-started/introduction/"
18+
url = "/docs"
1919
weight = 10
2020

2121
[[extra.list]]

content/docs/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ description = "The documents of the AdiDoks theme."
44
sort_by = "weight"
55
weight = 1
66
template = "docs/section.html"
7+
render = false
78
+++

content/docs/contributing/code-quality.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ draft = false
77
weight = 420
88
sort_by = "weight"
99
template = "docs/page.html"
10+
path = "contributing/code-quality/"
1011

1112
[extra]
1213
lead = "Ensuring good overall code quality."
@@ -64,5 +65,5 @@ By the way, [cppcheck](http://cppcheck.sourceforge.net) is another tool I like f
6465

6566
#### API Documentation ####
6667

67-
We use [Doxygen](http://www.doxygen.org) to generate our [API Documentation](@/docs/developer/libical.md) and put the result on our [GitHub provided webspace](http://libical.github.io). At this time our API Documentation is horrible and needs a lot of attention (see [libical#175](https://github.com/libical/libical/issues/175)), so one of our long term goals is to get the API Documentation into shape with full coverage.
68+
We use [Doxygen](http://www.doxygen.org) to generate our [API Documentation](@/docs/developer/v4/libical.md) and put the result on our [GitHub provided webspace](http://libical.github.io). At this time our API Documentation is horrible and needs a lot of attention (see [libical#175](https://github.com/libical/libical/issues/175)), so one of our long term goals is to get the API Documentation into shape with full coverage.
6869

content/docs/contributing/coding-style.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ draft = false
77
weight = 420
88
sort_by = "weight"
99
template = "docs/page.html"
10+
path = "contributing/coding-style"
1011

1112
[extra]
1213
lead = "Follow these Coding Style Rules. Strictly Enforced. The relevant GNU indent options are in parens."

content/docs/contributing/get-involved.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ draft = false
77
weight = 410
88
sort_by = "weight"
99
template = "docs/page.html"
10+
path = "contributing"
1011

1112
[extra]
1213
lead = "Follow the project and contribute."

content/docs/developer/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ template = "docs/section.html"
55
sort_by = "weight"
66
weight = 7
77
draft = false
8+
render = false
89
+++
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
+++
2+
title = "References v3"
3+
description = "Developer documentation."
4+
template = "docs/section.html"
5+
sort_by = "weight"
6+
weight = 2
7+
draft = false
8+
render = false
9+
+++
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ draft = false
77
weight = 40
88
sort_by = "weight"
99
template = "docs/page.html"
10+
path = "docs/v3/libical-glib/"
1011
+++
1112

0 commit comments

Comments
 (0)