Skip to content
Merged
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
6 changes: 1 addition & 5 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings"
"@babel/plugin-transform-runtime"
]
}
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to GitHub Pages

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm audit --audit-level=low
- run: npm run build
- name: Assemble site
run: |
mkdir _site
cp -r index.html ai.html pgp.txt work.txt dist ico img _site/
echo www.strml.net > _site/CNAME
- uses: actions/upload-pages-artifact@v4
with:
path: _site

deploy:
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
STRML.net
=========

[View Site](http://strml.net)
[View Site](https://strml.net) · [Age of AI edition](https://strml.net/ai.html)

Building
--------

Requires Node 20 or newer.

```bash
git clone git@github.com:STRML/strml.net.git
cd strml.net
npm install
npm run dev
# Open localhost:4003/index-dev.html in your browser
# Open localhost:4003 in your browser
```

Building for Production
Expand All @@ -21,12 +23,19 @@ Building for Production
npm run build
```

Age of AI edition
The bundles land in `dist/`, which is not committed.

Deploying
--------

`ai.html` is a second take on the same idea: a stylesheet that types itself, but it builds
a sci-fi instrument panel (specimen plot, timeline, telemetry, keyboard, an eye) as it goes.
The chapters live in `ai/styles*.css`; the instruments are in `ai.js`. Add `?speed=0` to the
URL to fast-forward.
Every push to `master` deploys the site. The `Deploy to GitHub Pages` workflow in
`.github/workflows/deploy.yml` runs `npm run build` and publishes the static files to
GitHub Pages.

Age of AI edition
--------

Note: on Node 17+, webpack 5.36 needs `NODE_OPTIONS=--openssl-legacy-provider`.
[`ai.html`](https://strml.net/ai.html) is a second take on the same idea: a stylesheet that
types itself, but it builds a sci-fi instrument panel (specimen plot, timeline, telemetry,
keyboard, an eye) as it goes. The chapters live in `ai/styles*.css`; the instruments are in
`ai.js`. Add `?speed=0` to the URL to fast-forward.
16 changes: 8 additions & 8 deletions ai.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
// (a specimen, a timeline, telemetry, a keyboard, an eye) that only become
// visible as the stylesheet reaches them.
//
import Markdown from 'markdown';
const md = Markdown.markdown.toHTML;
import workText from 'raw-loader!./work.txt';
import pgpText from 'raw-loader!./pgp.txt';
import headerHTML from 'raw-loader!./ai/header.html';
import preStyles from 'raw-loader!./ai/prestyles.css';
import mobileStyles from 'raw-loader!./ai/mobile.css';
import { marked } from 'marked';
const md = (text) => marked.parse(text, { gfm: false });
import workText from './work.txt?raw';
import pgpText from './pgp.txt?raw';
import headerHTML from './ai/header.html?raw';
import preStyles from './ai/prestyles.css?raw';
import mobileStyles from './ai/mobile.css?raw';
import replaceURLs from './lib/replaceURLs';
import {default as writeChar, writeSimpleChar, highlightAll} from './lib/writeChar';
import pauseFor from './lib/pacing';

const styleText = [0, 1, 2, 3, 4, 5, 6].map((i) => require('raw-loader!./ai/styles' + i + '.css').default);
const styleText = [0, 1, 2, 3, 4, 5, 6].map((i) => require('./ai/styles' + i + '.css?raw'));

// Vars that will help us get er done
const params = new URLSearchParams(window.location.search);
Expand Down
14 changes: 7 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'classlist-polyfill';
import Promise from 'bluebird';
import Markdown from 'markdown';
const md = Markdown.markdown.toHTML;
import workText from 'raw-loader!./work.txt';
import pgpText from 'raw-loader!./pgp.txt';
import headerHTML from 'raw-loader!./header.html';
let styleText = [0, 1, 2, 3].map((i) => require('raw-loader!./styles' + i + '.css').default);
import preStyles from 'raw-loader!./prestyles.css';
import { marked } from 'marked';
const md = (text) => marked.parse(text, { gfm: false });
import workText from './work.txt?raw';
import pgpText from './pgp.txt?raw';
import headerHTML from './header.html?raw';
let styleText = [0, 1, 2, 3].map((i) => require('./styles' + i + '.css?raw'));
import preStyles from './prestyles.css?raw';
import replaceURLs from './lib/replaceURLs';
import {default as writeChar, writeSimpleChar, highlightAll} from './lib/writeChar';
import pauseFor from './lib/pacing';
Expand Down
Loading
Loading