Skip to content

Commit a96b08e

Browse files
committed
feat: add Eleventy landing page with GitHub Pages deployment
0 parents  commit a96b08e

14 files changed

Lines changed: 1920 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy Eleventy to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
workflow_dispatch:
6+
permissions:
7+
contents: read
8+
concurrency:
9+
group: pages
10+
cancel-in-progress: false
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 22
19+
cache: npm
20+
- run: npm ci
21+
- run: npm run build
22+
- uses: actions/configure-pages@v5
23+
- uses: actions/upload-pages-artifact@v3
24+
with:
25+
path: _site
26+
deploy:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
permissions:
30+
pages: write
31+
id-token: write
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
steps:
36+
- name: Deploy
37+
id: deployment
38+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
_site/
3+
.DS_Store
4+
.local/

‎.tool-versions‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 22.23.3

‎README.md‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# libsrc.dev
2+
3+
A small Eleventy landing page for the libsrc GitHub organization. Static HTML and CSS, with no browser JavaScript or external fonts. Project content lives in `src/_data/site.json`.
4+
5+
## Local development
6+
7+
Install Node.js 22 or newer, then run:
8+
9+
```sh
10+
npm ci
11+
npm run dev
12+
```
13+
14+
Open the localhost URL printed by Eleventy. `npm run build` generates the deployable site in `_site/`.
15+
16+
### Typography
17+
18+
The local preview uses TT Firs Neue Regular and Medium from the supplied trial archive. These files live in ignored `.local/fonts/` and are copied only in Eleventy's serve mode. The included TypeType trial license permits evaluation but restricts public webpages. Production builds clean `_site/` first to prevent preview fonts from being deployed, and use the system sans-serif fallback. For public TT Firs Neue use, replace the trial with licensed webfont files and enable their font-face rules in the production stylesheet.
19+
20+
The online dependency audit currently reports advisories in Eleventy's development dependencies, with no suitable stable upgrade offered. The deployed output contains only static files; keep the development server local and use trusted build inputs.
21+
22+
## Deploy to GitHub Pages
23+
24+
1. Push this project to an organization repository, preferably `libsrcdev/libsrcdev.github.io`, on the `main` branch.
25+
2. In repository **Settings → Pages**, set the source to **GitHub Actions**. Run the included deployment workflow if it hasn't run yet.
26+
3. Set the Pages **Custom domain** to `libsrc.dev` and save it before changing DNS. An Actions deployment uses this setting; a `CNAME` file is not required.
27+
4. At your DNS provider, point the apex (`@`) to GitHub Pages using these four A records:
28+
29+
| Type | Name | Value |
30+
| --- | --- | --- |
31+
| A | @ | 185.199.108.153 |
32+
| A | @ | 185.199.109.153 |
33+
| A | @ | 185.199.110.153 |
34+
| A | @ | 185.199.111.153 |
35+
36+
Replace conflicting website A/AAAA records; preserve mail and TXT records. Alternatively, use an ALIAS/ANAME to `libsrcdev.github.io` if your provider supports it. Optional `www`: CNAME to `libsrcdev.github.io`.
37+
5. Once GitHub provisions the certificate, enable **Enforce HTTPS**. DNS and certificate provisioning can take up to 24 hours.
38+
6. Add the domain verification TXT record supplied by the service requiring verification. Use its exact host/name and value, not a placeholder. This is separate from any GitHub domain verification TXT record.
39+
40+
Official reference: [GitHub Pages custom domain setup](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site).
41+
42+
## Verify the eligible domain
43+
44+
```sh
45+
curl --head https://libsrc.dev/
46+
dig libsrc.dev A +short
47+
dig libsrc.dev TXT +short
48+
```
49+
50+
The HTTPS HEAD request must return **HTTP 200 directly**, without requiring a redirect, login, or challenge. Do not use `curl -L` when checking this requirement. Query the specific TXT hostname supplied by the verification service if it is not the apex.
51+
52+
`libsrc.dev` is an apex domain. Eleventy generates its homepage, but the hosting provider serves HTTP requests and TLS; a local build alone does not prove domain eligibility. Deployment, DNS access, the issued certificate, and the live HEAD response must all be verified before submitting the domain.

‎eleventy.config.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default function (eleventyConfig) {
2+
const previewFonts = process.env.ELEVENTY_RUN_MODE === "serve";
3+
eleventyConfig.addGlobalData("previewFonts", () => process.env.ELEVENTY_RUN_MODE === "serve");
4+
if (previewFonts) {
5+
eleventyConfig.addPassthroughCopy({ ".local/fonts": "assets/fonts" });
6+
}
7+
eleventyConfig.addPassthroughCopy("src/assets");
8+
eleventyConfig.addPassthroughCopy("src/robots.txt");
9+
return { dir: { input: "src", output: "_site" } };
10+
}

0 commit comments

Comments
 (0)