Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cecil config generator #96

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
76ae266
Implemented website layout in cecil
Denperidge Dec 16, 2024
bb11760
Cecil nav & prefix '/' in layout & site.css paths
Denperidge Dec 16, 2024
6080f60
Moved index.html into index, added if type home
Denperidge Dec 16, 2024
12e167d
Moved contribute.html
Denperidge Dec 16, 2024
dc17f50
Implemented nocontainer, moved documentation
Denperidge Dec 16, 2024
0b7eded
Work in progress email-filters
Denperidge Dec 16, 2024
0974025
Added CI for Github Pages
Denperidge Dec 16, 2024
ea87f0e
Fixed img path in documentation
Denperidge Dec 16, 2024
a24352a
Fixed cypht logo nav & documentation newline
Denperidge Dec 16, 2024
efbffb1
Implemented aria-current
Denperidge Dec 17, 2024
18c6424
Moved license, removed about, re-added nav path prefix
Denperidge Dec 17, 2024
5a8b70e
Moved dev-docs
Denperidge Dec 17, 2024
44bd14f
Implemented active for nav
Denperidge Dec 17, 2024
1799d7a
Moved features & how-to-join
Denperidge Dec 17, 2024
001d4ba
Moved modules & security
Denperidge Dec 17, 2024
55df306
Moved & modified email-filters
Denperidge Dec 17, 2024
408f202
Moved tests*
Denperidge Dec 17, 2024
284e8c1
Moved install*
Denperidge Dec 17, 2024
f4655b5
Removed duplicate footer
Denperidge Dec 17, 2024
a2711f7
First working example of redirects
Denperidge Dec 17, 2024
38be540
old -> pretty url redirects
Denperidge Dec 17, 2024
f3eadfd
Added make build, updated README
Denperidge Dec 17, 2024
a728c7c
Makefile: build default instead of serve
Denperidge Dec 17, 2024
039730b
Weighted nav, edit this page link fixed
Denperidge Dec 17, 2024
018d7cf
config-generator: added Make, implemented cache
Denperidge Dec 17, 2024
9e8643a
First succesful regex
Denperidge Dec 18, 2024
af08777
First succesful data generation
Denperidge Dec 18, 2024
e92be75
Correct results for everything aside from app
Denperidge Dec 18, 2024
7e23b55
app.php succesful data fetch
Denperidge Dec 18, 2024
4cef8e6
Begin comment clean & template
Denperidge Dec 18, 2024
0444921
First succesful render
Denperidge Dec 18, 2024
4452551
Config generator in layout, base functionality works
Denperidge Dec 18, 2024
5861ff6
Select inputs compatible, first non-styled draft
Denperidge Dec 18, 2024
0db99d4
configfiles -> configFiles, data.php usage
Denperidge Dec 18, 2024
469c60e
Moved data.php, adapted Makefile & README
Denperidge Dec 18, 2024
07828a8
Improved config-generator styling
Denperidge Dec 18, 2024
c998d2a
.text-left, first styled draft
Denperidge Dec 19, 2024
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
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Based on https://github.com/actions/starter-workflows/blob/main/pages/static.yml
name: Build static & deploy to GitHub Pages

on:
# Runs on pushes targeting specified branch
push:
branches: ["cecil"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allows this workflow to be called from other workflows
workflow_call:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
- name: Setup GitHub Pages
uses: actions/configure-pages@v5

- name: Build static
run: php cecil.phar build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
docs

_site/
.cache*
.cecil
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
all: data/configOptions.json

.PHONY: build
build:
php cecil.phar build

.PHONY: serve
serve:
php cecil.phar serve

data/configOptions.json:
php data/fetch.php
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# cypht-website
This is the source of the [cypht.org](https://cypht.org/) website. It's simple static HTML with no
This is the source of the [cypht.org](https://cypht.org/) website. It's a HTML site statically generated with [cecil](https://cecil.app/), with no non-vendor
JavaScript. Cypht (pronounced "sift") is like a news reader, but for E-mail. Cypht does not replace your existing accounts - it combines them into one. And it's also a news reader.

As of 2024-02-14, www.cypht.org updates from https://github.com/cypht-org/cypht-website/ on a daily cron job.

## How-to
### Build locally
This requires git & PHP 8 to be installed.
```bash
git clone https://github.com/cypht-org/cypht-website.git
cd cypht-website

# Build to _site/
php cecil.phar build # alt: make build

# Serve/develop on localhost:8000
php cecil.phar serve # alt: make serve
```

Nix users can use `nix-shell -p php81 gnumake git` to get all requirements to build.

### Update config generator options
```bash
# In project root
rm data/configOptions.json
php data/fetch.php # alt: make
```
Binary file added assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cecil.phar
Binary file not shown.
63 changes: 63 additions & 0 deletions cecil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
title: 'Cypht Website'
baseline: 'cypht.org website'
baseurl: 'https://www.cypht.org/'
description: 'Cecil-powered static site generation for cypht.org'
author:
name: multiple
url: 'https://example.com/'
image: cecil-card.png
pages:
virtual:
- path: contribute-redirect
slug: contribute
redirect: /contribute/
uglyurl: true
- path: developers-documentation-redirect
slug: developers-documentation
redirect: /developers-documentation/
uglyurl: true
- path: documentation-redirect
slug: documentation
redirect: /documentation/
uglyurl: true
- path: email-filters-redirect
slug: email-filters
redirect: /email-filters/
uglyurl: true
- path: features-redirect
slug: features
redirect: /features/
uglyurl: true
- path: how-to-join-redirect
slug: how-to-join
redirect: /how-to-join/
uglyurl: true
- path: install-redirect
slug: install
redirect: /install/
uglyurl: true
- path: install-1x-redirect
slug: install-1x
redirect: /install-1x/
uglyurl: true
- path: install-2x-redirect
slug: install-2x
redirect: /install-2x/
uglyurl: true
- path: license-redirect
slug: license
redirect: /license/
uglyurl: true
- path: modules-redirect
slug: modules
redirect: /modules/
uglyurl: true
- path: security-redirect
slug: security
redirect: /security/
uglyurl: true
- path: tests-redirect
slug: tests
redirect: /tests/
uglyurl: true

171 changes: 0 additions & 171 deletions contribute.html

This file was deleted.

12 changes: 12 additions & 0 deletions data/configFiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
"app.php",
"database.php",
"2fa.php",
"carddav.php",
"dynamic_login.php",
"github.php",
"ldap.php",
"oauth2.php",
"recaptcha.php",
"wordpress.php"
]
Loading