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
60 changes: 60 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Build, test and publish the page to GitHub Pages at
# https://abap2ui5.github.io/test-docs/.
#
# On a pull request it builds and tests only. On main it also deploys; the
# weekly run picks up the counted figures from the framework README
# (src/lib/facts.mjs), which change without a commit here.
#
# Needs Settings → Pages → Source: "GitHub Actions" once.
name: pages

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "17 6 * * 1"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run check
env:
ASTRO_TELEMETRY_DISABLED: "1"
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: dist

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.astro/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
48 changes: 48 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# AGENTS.md

Evaluate abap2UI5: one static page for the people who approve abap2UI5,
published at https://abap2ui5.github.io/test-docs/ by GitHub Pages. A
standalone site — its own repository, build and deployment — and nothing in
it depends on abap2UI5/docs or abap2UI5/playground at build time.

## Layout

| Path | Purpose |
| --- | --- |
| `src/pages/index.astro` | The page: the text of every section, as data at the top and markup below |
| `src/layouts/Page.astro` | The document: head, the Content-Security-Policy, the header with the section links, the foot |
| `src/components/` | `Stats` (the figures under the hero), `CostCalculator` (the sheet, after the manual's), `Icon` (inline marks) |
| `public/calc.js` | The cost calculator in the browser - the page's one script; the calculator reads correctly without it |
| `src/lib/facts.mjs` | Reads the counted figures from the framework README's `facts:start` block at build time (`EVALUATE_README` names a local file, else raw GitHub); a failed read costs the counts, never the build |
| `src/styles/global.css` | The one stylesheet; light and dark follow the system |
| `public/` | Font (Inter, self-hosted), logo, icons, the screenshot |
| `test/site.test.mjs` | `node:test` over the built `dist/index.html` |
| `.github/workflows/pages.yml` | Build + test on every PR; deploy on main and weekly (the figures move without a commit here) |

## Commands

```bash
npm ci
npm run dev # dev server, http://localhost:4321/test-docs/
npm run build # dist/
npm test # the tests, against dist/ - build first
npm run check # build + test, what CI runs
```

## Rules

- **The eight section ids are addresses.** `/docs/evaluate` redirects here
with its `#fragment`, and the framework's README links `#what-you-keep` and
`#when-to-use-it-and-when-not`. Reword a heading freely; keep the `id`.
`test/site.test.mjs` names all eight.
- **One script, as a file.** The policy is `script-src 'self'`: `public/calc.js`
and nothing inline, no `on…=` handler. Everything else works without it - the
FAQ is `<details>`, the header is anchors, the calculator's sheet is in the
page. No inline `style=""` either (`style-src 'self'`) — a class in `global.css`.
- **Nothing from another origin.** No CDN, no web font service, no analytics;
the font and the images are in `public/`.
- **No number typed by hand.** The counts come from the framework README.
- **Toolchain:** Node 22 (`.nvmrc`, `engines`), every dependency pinned
exactly (astro 7.3.8), actions pinned to commits.
- The site is written for people. Links into the manual are absolute
(`https://abap2ui5.github.io/docs/...`).
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CLAUDE.md

All project guidance lives in **[AGENTS.md](AGENTS.md)** — the layout, the
commands and the rules.

Read `AGENTS.md` before making any change.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# test-docs
test
# Evaluate abap2UI5

The page for the people who approve abap2UI5 rather than build with it — IT
management, architecture boards, product owners, SAP Basis and internal audit:
the problem it answers, when to use it and when RAP, what your organization
keeps, where it runs, what it costs, the objections a review board raises, and
how to evaluate it on one real screen in a week.

**→ https://abap2ui5.github.io/test-docs/**

A standalone site, independent of the
[documentation](https://abap2ui5.github.io/docs/) and the
[playground](https://abap2ui5.github.io/playground/): its own repository,
build and deployment. Built with [Astro](https://astro.build) into one static
page; its one script is the cost calculator's.

## Run it

```bash
npm ci
npm run dev # http://localhost:4321/test-docs/
npm run check # build + tests, what CI runs
```

Edit the text in `src/pages/index.astro`. The counted figures under the hero
are read at build time from the framework README and are never typed here.

## License

MIT, see [LICENSE](LICENSE). Inter is under the SIL Open Font License
([public/fonts/NOTICE.md](public/fonts/NOTICE.md)).
22 changes: 22 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Evaluate abap2UI5 - one static page, published by GitHub Pages at
// https://abap2ui5.github.io/test-docs/ (.github/workflows/pages.yml).
//
// Static output only: no client component, no island. The page's one script
// is the cost calculator's public/calc.js, loaded as a file; the policy is
// `script-src 'self'` (src/layouts/Page.astro), and test/site.test.mjs fails a
// build with any other script.
import { defineConfig } from "astro/config";

export default defineConfig({
site: "https://abap2ui5.github.io",
base: "/test-docs/",
trailingSlash: "ignore",
build: {
format: "directory",
assets: "assets",
// one stylesheet file, cached, rather than a <style> per page
inlineStylesheets: "never",
},
devToolbar: { enabled: false },
markdown: { syntaxHighlight: false },
});
Loading
Loading