Fancy next-gen Angestöpselt Homepage
Find a file
2023-03-31 17:40:26 +00:00
assets Scroll the title element in the tab widget into view after switching 2022-06-12 19:22:03 +02:00
cgi-bin Merge branch 'stage' into hardware-request-form-field 2023-03-17 13:12:36 +00:00
includes/layouts Introduce block and inline callout components 2022-12-01 07:42:23 +01:00
nix Update dependencies 2022-03-16 15:25:29 +01:00
playground Add initial backend implementation 2022-03-16 15:24:58 +01:00
sites „sites/angestoepselt/neuigkeiten/2023-03-31-iweltspende.md“ ändern 2023-03-31 17:40:26 +00:00
styles Merge branch 'stage' into hardware-request-form-field 2023-03-17 13:12:36 +00:00
.drone.yml change trigger branch to stage 2023-03-09 11:47:24 +01:00
.editorconfig Make sure YAML frontmatter is space-indented 2022-11-01 18:38:03 +01:00
.eleventy.js Add non-Nix Dockerfile 2022-10-27 17:34:59 +02:00
.eleventyignore Add initial support for multiple sites 2022-03-22 16:14:21 +01:00
.git-blame-ignore-revs Add .git-blame-ignore-revs 2022-03-15 09:38:47 +01:00
.gitignore Add attachment support for forms 2022-03-17 13:45:08 +01:00
.prettierignore Add initial support for multiple sites 2022-03-22 16:14:21 +01:00
.prettierrc Update formatting settings and reformat the codebase 2022-03-15 09:38:13 +01:00
docker-compose.yml fix traefik labels 2023-01-23 08:50:37 +00:00
Dockerfile Add static files required for other sites than angestoepselt to Docker build environment 2023-01-22 21:02:51 +01:00
flake.lock Add static content directory 2022-06-12 18:28:58 +02:00
flake.nix Add non-Nix Dockerfile 2022-10-27 17:34:59 +02:00
LICENSE add license due to public repo 2022-06-15 15:09:53 +02:00
package-lock.json Bilder 2022-06-14 22:44:35 +02:00
package.json Add initial support for multiple sites 2022-03-22 16:14:21 +01:00
README.md localhost via http 2023-03-15 19:23:26 +00:00

Angestöpselt Homepages

This repository mainly contains the next version of Angestöpselt's homepage, intended to be hosted at <angestoepselt.de>. It is built with the Eleventy static site generator, using SCSS for stylesheets. It also hosts the site for CoderDojo Würzburg.

Project structure

The project's directory tree is structured as follows. Note that this repository contains code to build different sites with some shared elements.

  • assets/ Shared static content. This will be copied into the assets directory when building any site.
  • cgi-bin/ CGI scripts. These are shared between sites, but not every site makes use of all the scripts. Note that these should not be called directly by site visitors. Rather they are called by rewriting paths in the server configuration where appropriate.
  • includes/ Directory for Eleventy includes. This contains layouts and template files.
  • nix/ Auxiliary build files used by the Nix package manager.
  • playground/ This directory contains anything that shouldn't be included directly but might be relevant to the project.
  • sites/ Each site gets a subdirectory here containing its content.
    • <name>
      • _static/ Site-specific static content.
        • assets/ Site-specific assets. This will be copied into the assets directory of the final output.
      • _data/ Directory for Eleventy global data files.
      • _images/ Place images that should be rendered by the build system in some way here.
      • httpd.conf Configuration file for lighttpd, which will serve the final site.
      • Anything else is actual content for the site (usually in the form of markdown files).
  • styles/ SCSS stylesheets. Anything directly in this directory that doesn't begin with an underscore will be available in the final build.
  • .eleventy.js Base Eleventy configuration. This is set up so that the correct paths for the selected site (according to the environment variable SITE) are selected automatically.
  • .eleventyignore Eleventy ignore file. Place paths in here that should be excluded in the final build.

Local development environment

To build the site locally, make sure you have Node installed (currently tested with version 14). Then run:

npm install
npm run build:styles
SITE=angestoepselt npm run dev:site

Go to http://localhost:8080/, which will update live when content changes (the initial build may take some time to render out the different image sizes). If you make style changes, make sure to recompile the CSS files with the second of the above commands. Alternatively, run npm run dev:styles in an additional terminal to watch for changes.

Nix environment

This repository also contains a Nix flake which contains the full development environment. nix develop will open a shell with all required tools you don't need to run npm install anymore. Run nix build ".#devEnv" -o .dev to get a running Node environment in the .dev folder (for example to configure an IDE).

When Node dependencies are updated (this will change package.json), make sure to run ./nix/update.sh to update the npm lockfile and the Nix environment.

The flake also contains a second package for building the production output:

nix build  # Will create an output derivation in 'result'

Deployment

Deploy the container from the image automatically by the CI server. Ask @yrd for the URL.

The container will expose the site under port 80. Further configuration is available via environment variables.

  • ZAMMAD_URL=https://ticket.z31.it URL of the Zammad server to use.
  • ZAMMAD_GROUP= Set this variable to override the group all Zammad tickets go in. If empty (the default), different forms will be sorted into different groups.
  • ZAMMAD_TOKEN This is the only mandatory option. Set it to a Zammad access token with the ticket.agent permission.

See https://codeberg.org/angestoepselt/homepage/issues/6#issuecomment-419104 for details.