This project is a scoreboard for the card game Whist. It follows the rules and scoring tables of the International World Whist Association (IWWA). All copy on the pages is in Dutch.
This project is built with the SSG Eleventy. Plain JavaScript is used in all script files. Markup is written in Liquid, a simple templating language.
To run the project locally, follow these steps:
- Clone the repo with (eg.
git clone [email protected]:martijnckx/wiezen.git
) - Run
npm install
to install the dependencies - Create and update the environment variables (
cp .env.example .env
) - Run
npm run dev
to start the development server - Open http://localhost:8000 in your browser
Some of these environment variables are required for a build to succeed. These are marked with a *
below.
SITE_NAME
* — used across the base template as alt tags, and as the main H1 of every pageSITE_META_TITLE
* — used as the<title>
of every page, as well as OpenGraph and Twitter title tagsSITE_META_DESCRIPTION
* — used as the meta description of every pageSITE_SOCIAL_SHARE_IMAGE_URL
— used as the meta image of every page (unless overwritten by specific pages). If not set, the image will be generated from a screenshot of the specific page by image.social. The domain should be added to your image.social account.SITE_HOSTNAME
* — used generation of screenshots, canonical URLs, sitemap, robots.txt ...PLAUSIBLE_DOMAIN_ID
— used for Plausible Analytics. If not set, the Plausible script will not be included. If set, the domain should be added to your Plausible account.
public/
contains static assets for the websitefunctions/tools/
contains Cloudflare Pages Functions that work as a proxy for Plausible Analyticscontent/
contains the content for the website_includes/
contains shared Liquid templates for the website_data/
contains data for the website, used for SSG
_site/
is the output directory for Eleventy's build
If you want to make changes to this project, you will most likely want to edit the following files:
content/*.liquid
are the basic pages for the website, with a script tag for page-specific client side logic at the bottomcontent/add-round.liquid
contains the form for adding each round, based on the rounds datacontent/_data/rounds.mjs
contains the Whist rounds with data like names, scoring tables, and more.public/assets/game.js
contains logic for the game, point calculations, and players.public/assets/style.css
contains the styling for the website..eleventy.js
contains build configurationcontent/_data/site.mjs
contains the site data, including author information used in security.txtpublic/humans.txt
contains information on The humans responsible & technology colophon
This project is deployed with Cloudflare Pages at wiezen.ckx.be.
If you want to deploy a fork of the project, you can choose any server that can serve static files from the _site
directory after a build. The only caveat: the Plausible Analytics proxy will not work outside of Cloudflare Pages.