diff --git a/.forgejo/CODEOWNERS b/.forgejo/CODEOWNERS new file mode 100644 index 0000000..431cfd9 --- /dev/null +++ b/.forgejo/CODEOWNERS @@ -0,0 +1 @@ +* @cccb/web diff --git a/.forgejo/dependabot.yml b/.forgejo/dependabot.yml new file mode 100644 index 0000000..174728a --- /dev/null +++ b/.forgejo/dependabot.yml @@ -0,0 +1,28 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "staging" + schedule: + interval: "weekly" + commit-message: + prefix: "gh-action" + labels: + - "gh-action" + - "dependencies" + reviewers: + - "cccb/web" + - package-ecosystem: "pip" + directory: "/" + target-branch: "dev" + schedule: + interval: "weekly" + commit-message: + prefix: "python" + labels: + - "python" + - "dependencies" + reviewers: + - "cccb/web" diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..40bd95b --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,73 @@ +name: Release website + +on: + schedule: + - cron: "0 4 * * *" + push: + branches: + - staging + - production + pull_request: + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + + - name: Build pages + run: hugo $(cat .hugo-params) + + - name: Add de_DE.UTF-8 locale + run: | + sudo apt-get update + sudo apt-get -y install locales + sudo locale-gen de_DE.UTF-8 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + cache: 'pip' + + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install -r requirements.txt + + - name: Generate calendars + run: python tools/merge_cals.py + + - name: Copy calendar to output dir + run: cp static/all.ics public/all.ics + + - name: Update homepage with latest event + run: upcoming="$(python tools/gen_upcoming.py static/all.ics 20 5 | tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html + + - name: Generate timestamp + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H%M%SZ')" >> $GITHUB_ENV + + - name: Create Release Archive + uses: thedoctor0/zip-release@0.7.6 + with: + type: zip + filename: ../release-${{ github.ref_name }}-${{ env.timestamp }}.zip + directory: public + + - name: Create Release + uses: ncipollo/release-action@v1.16.0 + with: + tag: ${{ github.ref_name }}-${{ env.timestamp }} + name: Website ${{ github.ref_name }} version ${{ env.timestamp }} + body: Website ${{ github.ref_name }} version ${{ env.timestamp }} + artifacts: release-${{ github.ref_name }}-${{ env.timestamp }}.zip + token: ${{ secrets.GITEA_TOKEN }} \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..431cfd9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @cccb/web diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..174728a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,28 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "staging" + schedule: + interval: "weekly" + commit-message: + prefix: "gh-action" + labels: + - "gh-action" + - "dependencies" + reviewers: + - "cccb/web" + - package-ecosystem: "pip" + directory: "/" + target-branch: "dev" + schedule: + interval: "weekly" + commit-message: + prefix: "python" + labels: + - "python" + - "dependencies" + reviewers: + - "cccb/web" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5741be5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,129 @@ +name: Release website + +on: + schedule: + - cron: "0 4 * * *" + push: + branches: + - staging + - production + pull_request: + workflow_dispatch: + +jobs: + pages: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + - name: Build pages + run: hugo $(cat .hugo-params) + - uses: actions/upload-artifact@v4 + name: Upload pages + with: + name: pages + path: public + + calendar: + needs: [ pages ] + runs-on: ubuntu-latest + steps: + - name: Add de_DE.UTF-8 locale + run: | + sudo apt-get update + sudo apt-get -y install locales + sudo locale-gen de_DE.UTF-8 + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v5 + with: + cache: 'pip' # caching pip dependencies + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install -r requirements.txt + - name: Download pages + uses: actions/download-artifact@v4 + with: + name: pages + path: public/ + - name: Generate calendars + run: python tools/merge_cals.py + - name: Copy calendar to output dir + run: cp static/all.ics public/all.ics + - name: Update homepage with latest event + run: upcoming="$(python tools/gen_upcoming.py static/all.ics 20 5 | tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html + - uses: actions/upload-artifact@v4 + name: Upload pages + with: + name: enhanced_pages + path: public + + staging: + needs: [ calendar ] + runs-on: ubuntu-latest + environment: staging + if: (github.ref == 'refs/heads/staging' && github.event_name == 'push') || github.event_name == 'schedule' + steps: + - name: Download pages + uses: actions/download-artifact@v4 + with: + name: enhanced_pages + path: public + - name: Generate timestamp + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H%M%SZ')" >> $GITHUB_ENV + - name: Create Release Archive + uses: thedoctor0/zip-release@0.7.6 + with: + type: zip + filename: ../release-staging-${{ env.timestamp }}.zip + directory: public + - name: Create Release + uses: ncipollo/release-action@v1.16.0 + with: + tag: staging-${{ env.timestamp }} + name: Website staging version ${{ env.timestamp }} + body: Website staging version ${{ env.timestamp }} + artifacts: release-staging-${{ env.timestamp }}.zip + token: ${{ secrets.GITHUB_TOKEN }} + + production: + needs: [ calendar ] + runs-on: ubuntu-latest + environment: production + if: (github.ref == 'refs/heads/production' && github.event_name == 'push') || github.event_name == 'schedule' + steps: + - name: Download pages + uses: actions/download-artifact@v4 + with: + name: enhanced_pages + path: public + - name: Generate timestamp + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H%M%SZ')" >> $GITHUB_ENV + - name: Create Release Archive + uses: thedoctor0/zip-release@0.7.6 + with: + type: zip + filename: ../release-production-${{ env.timestamp }}.zip + directory: public + - name: Create Release + uses: ncipollo/release-action@v1.16.0 + with: + makeLatest: true + tag: production-${{ env.timestamp }} + name: Website production version ${{ env.timestamp }} + body: Website production version ${{ env.timestamp }} + artifacts: release-production-${{ env.timestamp }}.zip + token: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file diff --git a/config/_default/params.toml b/config/_default/params.toml index 9490cc7..38e9f23 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -26,8 +26,8 @@ backgroundImageWidth = 1200 defaultFeaturedImage = "/img/avatar-CCCB-Logo.png" # used as default for featured images in all articles # highlightCurrentMenuArea = true -smartTOC = true -smartTOCHideUnfocusedChildren = true +# smartTOC = true +# smartTOCHideUnfocusedChildren = true giteaDefaultServer = "https://git.fsfe.org" forgejoDefaultServer = "https://v8.next.forgejo.org" @@ -68,7 +68,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" showBreadcrumbs = true showDraftLabel = true showEdit = true - editURL = "https://git.berlin.ccc.de/cccb-website-team/www/src/branch/staging/content/" + editURL = "https://github.com/cccb/www/tree/staging/content/" editAppendPath = true seriesOpened = false showHeadingAnchors = true diff --git a/content/veranstaltungen/amateurfunk.md b/content/page/amateurfunk.md similarity index 100% rename from content/veranstaltungen/amateurfunk.md rename to content/page/amateurfunk.md diff --git a/content/verein/anfahrt.md b/content/page/anfahrt.md similarity index 100% rename from content/verein/anfahrt.md rename to content/page/anfahrt.md diff --git a/content/veranstaltungen/bastelabend.md b/content/page/bastelabend.md similarity index 100% rename from content/veranstaltungen/bastelabend.md rename to content/page/bastelabend.md diff --git a/content/verein/calendar.md b/content/page/calendar.md similarity index 100% rename from content/verein/calendar.md rename to content/page/calendar.md diff --git a/content/veranstaltungen/chaosradio.md b/content/page/chaosradio.md similarity index 100% rename from content/veranstaltungen/chaosradio.md rename to content/page/chaosradio.md diff --git a/content/veranstaltungen/clubdiscordia.md b/content/page/clubdiscordia.md similarity index 96% rename from content/veranstaltungen/clubdiscordia.md rename to content/page/clubdiscordia.md index 4217595..6192413 100644 --- a/content/veranstaltungen/clubdiscordia.md +++ b/content/page/clubdiscordia.md @@ -12,7 +12,7 @@ menu: parent: "Veranstaltungen" --- -![E-Lab im CCCB](/img/club/e-lab-kisten.jpg) +![Kochen in der CCCB Küche](/img/club/Kochen_in_der_CCCB_Küche.jpg) Der **Club Discordia** ist ein öffentliches Treffen in den Clubräumen des CCC Berlin. Jeder, der Lust hat, ist eingeladen, **Donnerstags so ab ca. 19 Uhr bis 24 Uhr** vorbeizukommen. Wer will, kann seinen Computer mitbringen und sollte das auch tun, sonst ist es langweilig wenn die Nerds erstmal nicht mit einem reden oder wenig los ist. diff --git a/content/veranstaltungen/cms.md b/content/page/cms.md similarity index 100% rename from content/veranstaltungen/cms.md rename to content/page/cms.md diff --git a/content/veranstaltungen/datengarten.md b/content/page/datengarten.md similarity index 100% rename from content/veranstaltungen/datengarten.md rename to content/page/datengarten.md diff --git a/content/verein/fotos.md b/content/page/fotos.md similarity index 100% rename from content/verein/fotos.md rename to content/page/fotos.md diff --git a/content/verein/mastodon.md b/content/page/mastodon.md similarity index 100% rename from content/verein/mastodon.md rename to content/page/mastodon.md diff --git a/content/veranstaltungen/mitgliedschaft-infos.md b/content/page/mitgliedschaft-infos.md similarity index 100% rename from content/veranstaltungen/mitgliedschaft-infos.md rename to content/page/mitgliedschaft-infos.md diff --git a/content/veranstaltungen/openwrt.md b/content/page/openwrt.md similarity index 100% rename from content/veranstaltungen/openwrt.md rename to content/page/openwrt.md diff --git a/content/veranstaltungen/plenum.md b/content/page/plenum.md similarity index 100% rename from content/veranstaltungen/plenum.md rename to content/page/plenum.md diff --git a/content/veranstaltungen/spieleabend.md b/content/page/spieleabend.md similarity index 100% rename from content/veranstaltungen/spieleabend.md rename to content/page/spieleabend.md diff --git a/content/veranstaltungen/subbotnik.md b/content/page/subbotnik.md similarity index 100% rename from content/veranstaltungen/subbotnik.md rename to content/page/subbotnik.md diff --git a/static/img/club/e-lab-kisten.jpg b/static/img/club/40544370280_1703903e06.jpg similarity index 100% rename from static/img/club/e-lab-kisten.jpg rename to static/img/club/40544370280_1703903e06.jpg diff --git a/static/img/club/Kochen_in_der_CCCB_Küche.jpg b/static/img/club/Kochen_in_der_CCCB_Küche.jpg new file mode 100644 index 0000000..31bb484 Binary files /dev/null and b/static/img/club/Kochen_in_der_CCCB_Küche.jpg differ