Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 62 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";

export default function(eleventyConfig) {
// Add plugins
eleventyConfig.addPlugin(eleventyNavigationPlugin);
// eleventyConfig.addPlugin(eleventyImageTransformPlugin);

// Passthrough copy for assets
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy("src/favicon.ico");
eleventyConfig.addPassthroughCopy("src/site.webmanifest");
eleventyConfig.addPassthroughCopy("src/*.png");
eleventyConfig.addPassthroughCopy("src/*.svg");

// Passthrough copy for coverage map CSV from _data
eleventyConfig.addPassthroughCopy({
"src/_data/austin-mesh-rangetests.csv": "assets/data/austin-mesh-rangetests.csv"
});

// Passthrough copy for node_modules dependencies
eleventyConfig.addPassthroughCopy({
"node_modules/@11ty/is-land/is-land.js": "assets/js/is-land.js",
"node_modules/@lowlighter/matcha/dist/matcha.css": "assets/css/matcha.css",
"node_modules/leaflet/dist/leaflet.css": "assets/css/leaflet.css",
"node_modules/leaflet/dist/leaflet.js": "assets/js/leaflet.js",
"node_modules/leaflet/dist/images": "assets/css/images",
"node_modules/leaflet.heat/dist/leaflet-heat.js": "assets/js/leaflet-heat.js"
});

// Passthrough CNAME for GitHub custom domain
eleventyConfig.addPassthroughCopy("CNAME");

// Add hash filter for cache busting
eleventyConfig.addFilter("hash", function(url) {
// Simple timestamp-based hash for cache busting
// In production, you might want content-based hashing
return `${url}?v=${Date.now()}`;
});

// Add date filter for formatting dates
eleventyConfig.addFilter("readableDate", function(dateObj) {
return new Date(dateObj).toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric'
});
});

// Configure directories
return {
dir: {
input: "src",
output: "_site",
includes: "_includes",
data: "_data"
},
// Use Liquid for HTML files (default)
htmlTemplateEngine: "liquid",
// Use Liquid for markdown files
markdownTemplateEngine: "liquid"
};
}
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Deploy to GitHub Pages

on:
push:
branches:
- main
pull_request:
branches:
- main

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

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.1

- name: Setup Node.js
uses: actions/setup-node@v6.0.0
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v4.0.0
with:
path: ./_site

deploy:
# Only deploy on pushes to main, not on PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5
147 changes: 146 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,149 @@ Icon
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.apdisk

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/

# 11ty build
_site/
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Austin Mesh Website

The Austin Mesh static site built with [Eleventy](https://www.11ty.dev/) and [Matcha CSS](https://matcha.mizu.sh/).

## Development

Install dependencies by running:

```bash
npm install
```

Then start the development server:

```bash
npm start
```

Now you can visit http://localhost:8080 and the page will auto-reload when making changes to HTML or markdown files.

## Build

GitHub Actions normally builds and publishes the site. But to generate the full static site locally you can run:

```bash
npm run build
```

The output is in the `_site/` directory.

## Adding Content

### New Partner

Create a markdown file in `src/partners/`:

```markdown
---
title: Partner Name
tags: partners
date: 2024-01-04
image: /assets/images/partners/name/photo.webp
permalink: false
---

Partner description here.
```

Partners are sorted by `date` field.

### New Page

Create a markdown file in `src/`:

```markdown
---
layout: layouts/page.html
title: Page Title
description: Page description
---

Content here.
```

## Project Structure

```
src/
├── _data/ # Site configuration and data files
├── _includes/ # Layouts and partials
├── assets/ # Images, CSS, JS
├── partners/ # Partner pages
└── *.md # Content pages
```
Loading