diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index 6b3ab4f1..93fc5f4f 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -117,6 +117,9 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
+ env:
+ HUGO_VERSION: 0.126.1
+ TMP_SITE: tmp-site
runs-on: ubuntu-latest
permissions:
contents: read
@@ -126,6 +129,9 @@ jobs:
- run: echo "Deploying version ${{ needs.release.outputs.version }} to GitHub Page"
- name: Checkout
uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod for Hugo
- uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
@@ -134,22 +140,39 @@ jobs:
uses: actions/configure-pages@v5
- name: Create artifacts directory
run: |
- mkdir -p ./tmp-site
- cp ./resources/index-github-pages.html ./tmp-site/index.html
+ mkdir -p ${{ env.TMP_SITE }}
+ cp ./resources/index-github-pages.html ${{ env.TMP_SITE }}/index.html
- name: Build documentation
run: |
./gradlew -PforceVersion=${{ needs.release.outputs.version }} dokkaHtmlMultiModule --parallel
- cp -r ./build/dokka/htmlMultiModule ./tmp-site/docs
+ cp -r ./build/dokka/htmlMultiModule ${{ env.TMP_SITE }}/docs
- name: Build Open API documentation
run: |
./gradlew buildOpenApiSite --parallel
- cp -r ./build/openapi-site ./tmp-site/openapi
+ cp -r ./build/openapi-site ${{ env.TMP_SITE }}/openapi
# - name: Copy features report
- # run: cp -r ./build/reports/tests/test ./tmp-site/features
+ # run: cp -r ./build/reports/tests/test ${{ env.TMP_SITE }}features
+ - name: Install Hugo CLI
+ run: |
+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb \
+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
+ sudo snap install dart-sass
+ [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
+ - name: Build Hugo report site
+ env:
+ # For maximum backward compatibility with Hugo modules
+ HUGO_ENVIRONMENT: production
+ HUGO_ENV: production
+ run: |
+ hugo \
+ --minify \
+ --source ./resources/report \
+ --destination ../../${{ env.TMP_SITE }}/report \
+ --baseURL "${{ steps.pages.outputs.base_url }}/piper-kt/report/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.1
with:
- path: ./tmp-site
+ path: ${{ env.TMP_SITE }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..f55c5cc7
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "resources/report/themes/hugo-book"]
+ path = resources/report/themes/hugo-book
+ url = https://github.com/alex-shpak/hugo-book
diff --git a/build.gradle.kts b/build.gradle.kts
index f5d6487c..b877ab9a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -44,7 +44,13 @@ subprojects {
spotless {
yaml {
target("**/*.yml", "**/*.yaml")
- targetExclude("**/build/**", "**/node_modules/**", "**/helm-chart/**", "auth.yml")
+ targetExclude(
+ "**/build/**",
+ "**/node_modules/**",
+ "**/helm-chart/**",
+ "auth.yml",
+ "resources/report/**",
+ )
prettier()
}
}
diff --git a/resources/index-github-pages.html b/resources/index-github-pages.html
index 6ad92e22..c10df989 100644
--- a/resources/index-github-pages.html
+++ b/resources/index-github-pages.html
@@ -23,6 +23,10 @@
Documentation
GitHub Repo
+
+ Report
+
+
Kotlin docs
diff --git a/resources/report/.gitignore b/resources/report/.gitignore
new file mode 100644
index 00000000..e51c3331
--- /dev/null
+++ b/resources/report/.gitignore
@@ -0,0 +1,3 @@
+.hugo_build.lock
+public
+resources/_gen/**
diff --git a/resources/report/config.toml b/resources/report/config.toml
new file mode 100644
index 00000000..696e57dd
--- /dev/null
+++ b/resources/report/config.toml
@@ -0,0 +1,61 @@
+# hugo server --minify
+
+baseURL = 'https://zucchero-sintattico.github.io/'
+title = 'Piper Kt'
+theme = 'hugo-book'
+
+# Book configuration
+disablePathToLower = true
+enableGitInfo = true
+
+# Needed for mermaid/katex shortcodes
+[markup]
+[markup.goldmark.renderer]
+ unsafe = true
+
+[markup.tableOfContents]
+ startLevel = 1
+
+[menu]
+[[menu.after]]
+ name = "Github"
+ url = "https://github.com/zucchero-sintattico/piper-kt"
+ weight = 100
+
+[params]
+ # (Optional, default light) Sets color theme: light, dark or auto.
+ # Theme 'auto' switches between dark and light modes based on browser/os preferences
+ BookTheme = 'light'
+
+ # Set source repository location.
+ # Used for 'Last Modified' and 'Edit this page' links.
+ # BookRepo = 'https://github.com/zucchero-sintattico/piper-kt'
+
+ # Enable "Edit this page" links for 'doc' page type.
+ # Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
+ # Edit path must point to root directory of repo.
+ # BookEditPath = 'resources/report'
+
+ # Configure the date format used on the pages
+ # - In git information
+ # - In blog posts
+ BookDateFormat = 'January 2, 2006'
+
+ # (Optional, default true) Enables search function with flexsearch,
+ # Index is built on fly, therefore it might slowdown your website.
+ # Configuration for indexing can be adjusted in i18n folder per language.
+ BookSearch = true
+
+ # /!\ This is an experimental feature, might be removed or changed at any time
+ # (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
+ # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
+ # Theme will print warning if page referenced in markdown does not exists.
+ BookPortableLinks = true
+
+ # /!\ This is an experimental feature, might be removed or changed at any time
+ # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
+ BookServiceWorker = true
+
+ # /!\ This is an experimental feature, might be removed or changed at any time
+ # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
+ BookTranslatedOnly = false
diff --git a/resources/report/content/_index.md b/resources/report/content/_index.md
new file mode 100644
index 00000000..7f5bc61e
--- /dev/null
+++ b/resources/report/content/_index.md
@@ -0,0 +1,18 @@
+---
+title: Introduction
+type: docs
+---
+
+# Piper Kt
+
+## Members
+
+- [Manuel Andruccioli](mailto:manuel.andruccioli@studio.unibo.it)
+- [Alessandro Mazzoli](mailto:alessandro.mazzoli9@studio.unibo.it)
+- [Tommaso Patriti](mailto:tommaso.patriti@studio.unibo.it)
+- [Luigi Borriello](mailto:luigi.borriello2@studio.unibo.it)
+
+## Scenario
+
+The project consists of creating a platform that enables real-time communication between users in various form, inspired by Discord.
+Piper-kt will offer the possibility of registration and access through a login system, allowing users to establish and manage social connections through friend requests. The platform will facilitate intra-user communication, with notifications for messages and management of friendships. Users will have the freedom to create and manage their own servers, with features for managing text and multimedia channels. It will be possible to send messages, participate in voice and video calls, and manage webcams and microphones within channels. In addition, server creators will be able to moderate them, removing unwanted members.
diff --git a/resources/report/content/docs/01-requirements/index.md b/resources/report/content/docs/01-requirements/index.md
new file mode 100644
index 00000000..d85015e7
--- /dev/null
+++ b/resources/report/content/docs/01-requirements/index.md
@@ -0,0 +1,13 @@
+---
+title: "Requirements"
+weight: 1
+# bookFlatSection: false
+# bookToc: true
+# bookHidden: false
+# bookCollapseSection: false
+# bookComments: false
+# bookSearchExclude: false
+---
+
+# Requirements
+
diff --git a/resources/report/content/docs/02-design/index.md b/resources/report/content/docs/02-design/index.md
new file mode 100644
index 00000000..ff402323
--- /dev/null
+++ b/resources/report/content/docs/02-design/index.md
@@ -0,0 +1,6 @@
+---
+title: "Design"
+weight: 2
+---
+
+# Design
diff --git a/resources/report/themes/hugo-book b/resources/report/themes/hugo-book
new file mode 160000
index 00000000..f8a0fc4e
--- /dev/null
+++ b/resources/report/themes/hugo-book
@@ -0,0 +1 @@
+Subproject commit f8a0fc4e246c61cea8159d2d2955f488e7d13848