Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c652be5
feat(sveltia-gateway): single sign-on gateway for Sveltia CMS
tefkah Oct 14, 2026
0a4acff
feat(site): trialanderror.org, built and deployed from the monorepo
tefkah Oct 14, 2026
78e7e3e
style: format scripts/split.ts
tefkah Oct 14, 2026
d9b21fa
docs(site): note that a local deploy needs a reinstall afterwards
tefkah Oct 14, 2026
517109b
chore: point package repository fields at TrialAndErrorOrg/trialanderror
tefkah Oct 14, 2026
fa80676
feat(site): read content from site-content and secrets from 1Password
tefkah Oct 14, 2026
234f237
docs: link to TrialAndErrorOrg/trialanderror instead of parsers
tefkah Oct 14, 2026
58d7a18
fix(site): know the public address behind a proxy, rebuild without wr…
tefkah Oct 14, 2026
fafa6ba
chore(site): use the 1Password item names for the Strapi and Underlay…
tefkah Oct 14, 2026
2f64cf3
feat(site): the server reads its secrets from 1Password at start
tefkah Oct 14, 2026
c02426a
docs(site): turn the readme into a map, move instructions to docs/
tefkah Oct 14, 2026
2a76d87
docs(site): add the docs the readme points to
tefkah Oct 14, 2026
0724169
feat(site): sign-in button says Microsoft, no access token option
tefkah Oct 14, 2026
4673e65
fix(sveltia-gateway): tell Sveltia editors may push
tefkah Oct 14, 2026
1949c85
fix: add deploy url
tefkah Oct 14, 2026
0a9de57
build(site): slim the image from 565 to 297 MB
tefkah Oct 14, 2026
1bc38b2
feat(site): the blog comes from site-content, edited in /admin
tefkah Oct 14, 2026
a47f351
feat(site): read the Unsplash access key from 1Password
tefkah Oct 14, 2026
88083d2
fix(sveltia-gateway): allow the editorial workflow's createRef and la…
tefkah Oct 14, 2026
606ddd9
feat(site): live preview of blog posts in /admin
tefkah Oct 14, 2026
36ba8ec
fix(site): store /admin's dates in UTC and leave empty fields out
tefkah Oct 14, 2026
27e0bf5
Merge branch 'main' into site-converter
tefkah Oct 14, 2026
9321fc8
feat(sveltia-gateway): tell the site's own routes who is signed in
tefkah Oct 14, 2026
38c5617
feat(site): the converter at /admin/convert
tefkah Oct 14, 2026
cb38a32
feat(site): add editors to the Entra app from the command line
tefkah Oct 22, 2026
a39c622
feat(site): hover journal menus, quieter contents that follow the rea…
tefkah Oct 22, 2026
860787f
feat(site): serve journal downloads from the site's own domain, read …
tefkah Oct 22, 2026
256c959
feat(site): journal front page from site-content, compact article lis…
tefkah Oct 22, 2026
7ccf5dd
feat(site): release the site by hand with scripts/release.sh, smoke t…
tefkah Oct 23, 2026
e2c225c
fix(site): ask Coolify to deploy with POST
tefkah Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ jobs:

- run: pnpm format:check

- run: pnpm turbo run build typecheck test --cache-dir=.turbo/cache
# The site is built and deployed by site.yml: its build reads Strapi, Underlay and
# site-content. Here it's only type-checked.
- run: pnpm turbo run build typecheck test --cache-dir=.turbo/cache --filter='!site'

- run: pnpm turbo run typecheck --cache-dir=.turbo/cache --filter=site

# Non-blocking reminder: list packages that changed without a changeset.
- name: Changeset status
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -> build, pack and publish them via npm trusted publishing (OIDC)
#
# No npm token is used anywhere. Each package must have a trusted publisher configured on npmjs.com
# pointing at TrialAndErrorOrg/parsers + this file (release.yml). See docs/releasing.md.
# pointing at TrialAndErrorOrg/trialanderror + this file (release.yml). See docs/releasing.md.
#
# Layout follows https://changesets.dev/guide/automating (trusted publishing variant): only the
# `publish` job gets `id-token: write`.
Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Builds the website (apps/site) with the content from TrialAndErrorOrg/site-content, publishes it
# as ghcr.io/trialanderrororg/site and asks Coolify to deploy it. Fast because it keeps every cache
# between runs: pnpm's store, turbo's cache (the libraries the site uses) and the site's own caches
# of resized images, share images and journal article HTML. The image only packages the built
# site, see apps/site/Dockerfile.
#
# Secret: OP_TOKEN, a 1Password service account token. varlock reads everything else from the
# Website vault (apps/site/.env.schema). See apps/site/docs/deploying.md.
name: site

on:
push:
branches: [main]
paths:
- apps/site/**
- libs/sveltia-gateway/**
# The converter at /admin/convert and the Typst template it puts in its downloads
- apps/converter/**
- templates/typst/**
- pnpm-lock.yaml
- .github/workflows/site.yml
# Sent by Strapi when something is published. site-content starts the workflow directly instead
repository_dispatch:
types: [content-updated]
# New journal articles reach Underlay without telling anyone
schedule:
- cron: '17 4 * * *'
workflow_dispatch:

permissions: {}

# Only the newest content matters: a save cancels the build of the one before
concurrency:
group: site
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE: ghcr.io/trialanderrororg/site
CONTENT_DIR: ${{ github.workspace }}/site-content
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false

# What editors change in /admin, see apps/site/src/integrations/content.ts
- uses: actions/checkout@v7
with:
repository: TrialAndErrorOrg/site-content
path: site-content
persist-credentials: false

- uses: pnpm/action-setup@v6
with:
version: 11.3.0

- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile

- name: Restore turbo cache
uses: actions/cache@v6
with:
path: .turbo/cache
key: turbo-site-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-site-${{ runner.os }}-
turbo-${{ runner.os }}-main-

# Content-addressed, so restoring the newest copy is always safe; each run saves a fresh one
- name: Restore the site's image and article caches
uses: actions/cache@v6
with:
path: |
apps/site/node_modules/.astro
apps/site/node_modules/.cache
key: site-assets-${{ github.run_id }}
restore-keys: site-assets-

# The site's build script runs through varlock, which reads the Strapi and Underlay tokens
# from 1Password and hides them in the log
- name: Build
run: pnpm turbo run build --filter=site... --cache-dir=.turbo/cache
env:
OP_TOKEN: ${{ secrets.OP_TOKEN }}

# The built site plus only its production dependencies, with the musl builds of native
# packages for the Alpine image
- name: Package
run: pnpm --filter site deploy --prod --legacy --os=linux --cpu=x64 --libc=musl "$RUNNER_TEMP/site"

- name: Build the image
run: |
docker build "$RUNNER_TEMP/site" -f apps/site/Dockerfile \
--label org.opencontainers.image.source=https://github.com/${{ github.repository }} \
--label org.opencontainers.image.revision=${{ github.sha }} \
-t "$IMAGE:latest" -t "$IMAGE:${{ github.sha }}"

# Every route the server renders itself, so a runtime package missing from the image's
# dependencies fails here instead of on the live site. scripts/release.sh runs it too
- name: Smoke test the image
run: apps/site/scripts/smoke-test.sh "$IMAGE:${{ github.sha }}"

- name: Push the image
run: |
echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
docker push --all-tags "$IMAGE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Skipped until COOLIFY_DEPLOY_URL is set in apps/site/.env.schema
- name: Deploy
working-directory: apps/site
run: |
# shellcheck disable=SC2016 # expanded by the inner shell, after varlock has filled them in
pnpm exec varlock run -- sh -c '
if [ -z "$COOLIFY_DEPLOY_URL" ]; then echo "No COOLIFY_DEPLOY_URL, not deploying"; exit 0; fi
curl --fail --silent --show-error -X POST -H "Authorization: Bearer $COOLIFY_TOKEN" "$COOLIFY_DEPLOY_URL"
'
env:
OP_TOKEN: ${{ secrets.OP_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,14 @@ thebiggestfile.ts

.env
.env.*
# Examples and varlock schemas hold no values, so they belong in the repository
!.env.example
!.env.schema
graph
# typedoc scratch output (scripts/readme.ts); hand-written docs/*.md are tracked
**/docs/*
!/docs/*.md
!/apps/site/docs/*.md

.sveltekit

Expand Down
3 changes: 2 additions & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sortPackageJson": false,
"ignorePatterns": [
"dist",
"apps/site",
"deprecated",
"coverage",
".next",
Expand Down Expand Up @@ -37,7 +38,7 @@
"files": ["apps/converter/**"],
"options": {
"sortTailwindcss": {
"stylesheet": "apps/converter/app/globals.css"
"stylesheet": "apps/converter/styles.css"
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Additionally, there are a few other tools:
- `unified-latex`: Utilities for working with [unified-latex](https://github.com/siefkenj/unified-latex) trees.
- `book-converter`: a CLI to turn a `.docx` book into LaTeX.

`apps/converter` is the web converter (Next.js) that uses the parsers to turn `.docx` manuscripts into LaTeX.
`apps/converter` is the web converter, a React component that uses the parsers to turn `.docx` manuscripts into LaTeX and Typst in the browser. The website (`apps/site`) shows it at `/admin/convert`, where editors signed in with Microsoft can also search OJS.

See below for more info.

Expand Down Expand Up @@ -74,7 +74,7 @@ Packages marked _private_ are not published.

| Package | Description |
|---|---|
| [`crossref-json`](libs/citations/crossref-json) | Defined in: [index.ts:38](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/citations/crossref-json/src/index.ts |
| [`crossref-json`](libs/citations/crossref-json) | Defined in: [index.ts:38](https://github.com/TrialAndErrorOrg/trialanderror/blob/main/libs/citations/crossref-json/src/index.ts |
| [`crossref-to-csl`](libs/citations/crossref-to-csl) | crossrefToCsl(item: CrossrefJSON): CSL; |
| [`csl-consolidate`](libs/citations/csl-consolidate) | Try to resolve a list of CSL data with crossref metadata |
| [`csl-to-biblatex`](libs/citations/csl-to-biblatex) | Somewhat jank CSL-JSON to biblatex converter |
Expand Down Expand Up @@ -265,8 +265,8 @@ typst compile \
out/article/main.typ
```

Or pass `--compile --font-path …` to either CLI to do it in one go. The converter app
(`apps/converter`) has a Typst tab that downloads the same output, template included, as a zip.
Or pass `--compile --font-path …` to either CLI to do it in one go. The converter
(`apps/converter`, on the site at `/admin/convert`) has a Typst tab that downloads the same output, template included, as a zip.

<!--

Expand Down Expand Up @@ -311,13 +311,13 @@ Plugin tries to locate an "abstract" section in a `jast` tree and moves it to th
[unifiedgh]: https://github.com/unifiedjs/unified
[xast-from-xml]: https://github.com/syntax-tree/xast-util-from-xml
[rehype]: https://github.com/rehypejs/rehype
[rejour]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour
[rejour-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour-parse
[rejour-stringify]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour-stringify
[rejour-move-abstract]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour-move-abstract
[rejour-meta]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour-meta
[jast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/jast
[jastscript]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/jastscript
[rejour]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/rejour
[rejour-parse]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/rejour-parse
[rejour-stringify]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/rejour-stringify
[rejour-move-abstract]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/rejour-move-abstract
[rejour-meta]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/rejour-meta
[jast]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/jast
[jastscript]: https://github.com/TrialAndErrorOrg/trialanderror/tree/main/libs/jastscript
[hast]: https://github.com/syntax-tree/hast
[xast]: https://github.com/syntax-tree/xast
[mdast]: https://github.com/syntax-tree/mdast
2 changes: 0 additions & 2 deletions apps/converter/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions apps/converter/app/api/ojs/file/route.ts

This file was deleted.

36 changes: 0 additions & 36 deletions apps/converter/app/api/ojs/files/route.ts

This file was deleted.

29 changes: 0 additions & 29 deletions apps/converter/app/api/ojs/publication/route.ts

This file was deleted.

34 changes: 0 additions & 34 deletions apps/converter/app/api/ojs/submissions/route.ts

This file was deleted.

19 changes: 0 additions & 19 deletions apps/converter/app/layout.tsx

This file was deleted.

Loading
Loading