Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- main

env:
LATEST_VERSION: 3.0.20
LATEST_VERSION_3: 3.0.20
LATEST_VERSION_4: master

jobs:
build:
Expand All @@ -20,38 +21,58 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
sed -i "s#@version@#v${{ env.LATEST_VERSION }}#g" content/_index.md
sed -i "s#@version_3@#v${{ env.LATEST_VERSION_3 }}#g" content/_index.md
sed -i "s#@version_4@#${{ env.LATEST_VERSION_4 }}#g" content/_index.md
export GITHUB_PAGES_URL=$(gh api "repos/${{ github.repository }}/pages" --jq '.html_url')
sed -i "s#https:\/\/libical\.github\.io#${GITHUB_PAGES_URL}#g" config.toml
export GITHUB_CODE_WEBSITE="${{ github.server_url }}/${{ github.repository }}"
sed -i "s#https:\/\/github.com\/libical\/libical.github.io#${GITHUB_CODE_WEBSITE}#g" config.toml
- name: Build website
uses: shalzz/zola-deploy-action@v0.19.2
uses: shalzz/zola-deploy-action@v0.22.1
env:
BUILD_ONLY: true
- name: Checkout libical v${{ env.LATEST_VERSION }}
- name: Checkout libical v3 v${{ env.LATEST_VERSION_3 }}
uses: actions/checkout@v4
with:
repository: libical/libical
ref: v${{ env.LATEST_VERSION }}
path: libical-sources
ref: v${{ env.LATEST_VERSION_3 }}
path: libical3-sources
- name: Checkout libical v4 ${{ env.LATEST_VERSION_4 }}
uses: actions/checkout@v4
with:
repository: libical/libical
ref: ${{ env.LATEST_VERSION_4 }}
path: libical4-sources
- name: Install dependencies
run: sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev cmake ninja-build doxygen graphviz
- name: Configure libical
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
- name: Configure libical v3
run: |
cd libical-sources
cd libical3-sources
mkdir build
cmake -B build -G Ninja -DENABLE_GTK_DOC=True -DICAL_GLIB=True -DGOBJECT_INTROSPECTION=True -DICAL_BUILD_DOCS=True
- name: Build libical documentation
- name: Build libical v3 documentation
run: |
cd libical-sources
cd libical3-sources
cmake --build build --target docs
- name: Configure libical v4
run: |
cd libical4-sources
mkdir build
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
- name: Build libical v4 documentation
run: |
cd libical4-sources
cmake --build build --target docs libical-glib-doc
- name: Move Documentation
run: |
sudo rm -R public/docs/developer/libical
sudo mv libical-sources/build/apidocs/html public/docs/developer/libical
sudo rm -R public/docs/developer/libical-glib
sudo mv public/libical-glib public/docs/developer/libical-glib
sudo rm -R public/docs/v3/libical
sudo mv libical3-sources/build/apidocs/html public/docs/v3/libical
sudo rm -R public/docs/v3/libical-glib
sudo mv public/libical-glib public/docs/v3/libical-glib
sudo rm -R public/docs/v4/libical
sudo mv libical4-sources/build/apidocs/html public/docs/v4/libical
sudo rm -R public/docs/v4/libical-glib
sudo mv libical4-sources/build/docs/reference/libical-glib/libical-glib public/docs/v4/libical-glib
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
5 changes: 0 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ build_search_index = true

theme = "adidoks"

[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true

[extra]
# Put all your custom variables here
edit_page = false
Expand Down
4 changes: 2 additions & 2 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ title = "The iCalendar library"
lead = '<b>libical</b> is an Open Source implementation of the iCalendar protocols and protocol data units.'
url = "/docs/getting-started/introduction/"
url_button = "Get started"
repo_version = "@version@"
repo_version = "@version_3@ and @version_4@"
repo_license = "MPL v2.0 or LGPL v2.1 —"
repo_url = "https://github.com/libical/libical/"

# Menu items
[[extra.menu.main]]
name = "Docs"
section = "docs"
url = "/docs/getting-started/introduction/"
url = "/docs"
weight = 10

[[extra.list]]
Expand Down
1 change: 1 addition & 0 deletions content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ description = "The documents of the AdiDoks theme."
sort_by = "weight"
weight = 1
template = "docs/section.html"
render = false
+++
3 changes: 2 additions & 1 deletion content/docs/contributing/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ draft = false
weight = 420
sort_by = "weight"
template = "docs/page.html"
path = "contributing/code-quality/"

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

#### API Documentation ####

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.
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.

1 change: 1 addition & 0 deletions content/docs/contributing/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ draft = false
weight = 420
sort_by = "weight"
template = "docs/page.html"
path = "contributing/coding-style"

[extra]
lead = "Follow these Coding Style Rules. Strictly Enforced. The relevant GNU indent options are in parens."
Expand Down
1 change: 1 addition & 0 deletions content/docs/contributing/get-involved.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ draft = false
weight = 410
sort_by = "weight"
template = "docs/page.html"
path = "contributing"

[extra]
lead = "Follow the project and contribute."
Expand Down
1 change: 1 addition & 0 deletions content/docs/developer/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ template = "docs/section.html"
sort_by = "weight"
weight = 7
draft = false
render = false
+++
9 changes: 9 additions & 0 deletions content/docs/developer/v3/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "References v3"
description = "Developer documentation."
template = "docs/section.html"
sort_by = "weight"
weight = 2
draft = false
render = false
+++
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ draft = false
weight = 40
sort_by = "weight"
template = "docs/page.html"
path = "docs/v3/libical-glib/"
+++

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ draft = false
weight = 30
sort_by = "weight"
template = "docs/page.html"
path = "docs/v3/libical/"
+++

10 changes: 10 additions & 0 deletions content/docs/developer/v4/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "References v4"
description = "Developer documentation."
template = "docs/section.html"
sort_by = "weight"
weight = 1
draft = false
render = false
aliases = ["/docs/latest"]
+++
13 changes: 13 additions & 0 deletions content/docs/developer/v4/libical-glib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+++
title = "libical-glib"
description = "Developer documentation."
date = 2021-05-01T19:30:00+00:00
updated = 2021-05-01T19:30:00+00:00
draft = false
weight = 40
sort_by = "weight"
template = "docs/page.html"
path = "docs/v4/libical-glib/"
aliases = ["/docs/latest/libical-glib"]
+++

13 changes: 13 additions & 0 deletions content/docs/developer/v4/libical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+++
title = "libical"
description = "Developer documentation."
date = 2021-05-01T19:30:00+00:00
updated = 2021-05-01T19:30:00+00:00
draft = false
weight = 30
sort_by = "weight"
template = "docs/page.html"
path = "docs/v4/libical/"
aliases = ["/docs/latest/libical"]
+++

1 change: 1 addition & 0 deletions content/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ template = "docs/section.html"
sort_by = "weight"
weight = 1
draft = false
render = false
+++
16 changes: 13 additions & 3 deletions content/docs/getting-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ draft = false
weight = 10
sort_by = "weight"
template = "docs/page.html"
path = "docs"
aliases = ["/docs", "/docs/developer", "/docs/developer/v3", "/docs/developer/v4"]

[extra]
lead = 'Libical is an Open Source implementation of the iCalendar protocols and protocol data units. The iCalendar specification describes how calendar clients can communicate with calendar servers so users can store their calendar data and arrange meetings with other users. '
Expand All @@ -20,10 +22,18 @@ One page summary of how to start with the library. [Quick Start →](@/docs/gett

## Contributing

Find out how to contribute to. [Contributing →](@docs/contributing/get-involved.md)
Find out how to contribute to. [Contributing →](@/docs/contributing/get-involved.md)

## Developer references

[libical Reference Documentation →](../../developer/libical/)
### Version 4

[libical-glib Reference Documentation →](../../developer/libical-glib/)
[libical Reference Documentation →](@/docs/developer/v4/libical.md)

[libical-glib Reference Documentation →](@/docs/developer/v4/libical-glib.md)

### Version 3

[libical Reference Documentation →](@/docs/developer/v3/libical.md)

[libical-glib Reference Documentation →](@/docs/developer/v3/libical-glib.md)
4 changes: 2 additions & 2 deletions content/docs/maintainers/update-api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Clone the website:
git clone https://github.com/libical/libical.github.io.git
```

Open the file in `.github/workflows/main.yml` and update `LATEST_VERSION` to the
new version. Commit and push to the repository to trigger a website and
Open the file in `.github/workflows/main.yml` and update `LATEST_VERSION_3` and/or
`LATEST_VERSION_4` to the new version. Commit and push to the repository to trigger a website and
documentation update.
25 changes: 25 additions & 0 deletions templates/macros/docs-sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% macro docs_sidebar_section(section) %}
{% if section.pages %}
<h3>{{ section.title }}</h3>
<ul class="list-unstyled">
{% for page in section.pages %}
<li><a class="docs-link{% if current_url == page.permalink %} active{% endif %}" href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if section.subsections %}
{% for s in section.subsections %}
{% set subsection = get_section(path=s) %}
{{ macros_sidebar::docs_sidebar_section(section=subsection) }}
{% endfor %}
{% endif %}
{% endmacro %}
{% macro docs_sidebar(current_section) %}
<div class="col-lg-5 col-xl-4 docs-sidebar">
<nav class="docs-links" aria-label="Main navigation">
{% set index_path = current_section ~ "/_index.md" | trim_start_matches(pat="/") %}
{% set index = get_section(path=index_path) %}
{{ macros_sidebar::docs_sidebar_section(section=index) }}
</nav>
</div>
{% endmacro %}
23 changes: 23 additions & 0 deletions templates/macros/docs-toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% macro docs_toc(page) %}
{% if page.extra.toc %}
<nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
<div class="page-links">
<h3>On this page</h3>
<nav id="TableOfContents">
<ul>
{% for h1 in page.toc %}
<li><a href="{{ h1.permalink | safe}}">{{ h1.title }}</a></li>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
</nav>
{% endif %}
{% endmacro %}
26 changes: 26 additions & 0 deletions templates/macros/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% macro footer() %}
<footer class="footer text-muted">
<div class="container">
<div class="row">
<div class="col-lg-8 order-last order-lg-first">
<ul class="list-inline">
{% if config.extra.footer.info %}
<li class="list-inline-item">{{ config.extra.footer.info | default(value="Powered by AdiDoks") | safe }}</li>
{% else %}
<li class="list-inline-item">Powered by <a href="https://www.netlify.com/">Netlify</a>, <a href="https://www.getzola.org/">Zola</a>, and <a href="https://github.com/aaranxu/adidoks">AdiDoks</a></li>
{% endif %}
</ul>
</div>
<div class="col-lg-8 order-first order-lg-last text-lg-end">
<ul class="list-inline">
{% if config.extra.footer.nav %}
{% for val in config.extra.footer.nav %}
<li class="list-inline-item"><a href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{ val.name }}</a></li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
</footer>
{% endmacro %}
Loading