Rebuild website with Astro, derive everything from arabterm.db#10
Merged
Conversation
Replaces the Angular SPA + 42 committed JSON files with an Astro static site that reads arabterm.db at build time via better-sqlite3. Highlights: - All 53 dictionaries are now rendered (previously only 39 arabterm_*). - Big dictionaries are paginated (1000 terms / page) — unified_medical builds 133 pages, etc. Total ~492 static pages. - Per-dictionary JSON download endpoints, no JSON checked into the repo. - Legacy unprefixed URLs (e.g. /water_engineering/) are preserved as static meta-refresh redirects to the canonical /arabterm_water_engineering/. Legacy slug list lives in website/src/lib/db.ts (LEGACY_SLUGS). - Live search delegated to wikitermbase (مسرد الويكي) via header link. - GH Pages workflow simplified: npm run build, upload website/dist/, no more 404.html SPA shim. Cleanup: - Deleted /data/ (42MB of unused CSVs) and /exports/ (gitignored, removed from disk). arabterm.db is the single source of truth. - Removed old Angular tree, hardcoded dictionaries.ts, assets/*.json. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
actions/configure-pages v5 → v6 actions/upload-pages-artifact v3 → v5 actions/deploy-pages v4 → v5 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move the JSON endpoint from /<name_tech>/terms.json to /<name_tech>.json so that browsers save the file as e.g. unified_medical_dictionary.json instead of terms.json. content-disposition headers aren't honored by GitHub Pages, so the URL is the only reliable way to set the filename. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Angular SPA + 42 committed JSON dictionary files at website/ with a small Astro static site that reads
arabterm.dbdirectly at build time viabetter-sqlite3. The site is purely a static index + paginated term tables + per-dictionary JSON downloads; live search is delegated to wikitermbase ("مسرد الويكي").arabterm_*).unified_medical_dictionarybuilds 133 pages,al_mawrid_al_hadeeth63, etc. Total ~492 static pages built in ~21 s.dist/at build time. No JSON committed./water_engineering/) are emitted as static meta-refresh redirects to the canonical/arabterm_water_engineering/. List lives inLEGACY_SLUGSin website/src/lib/db.ts.npm run build, uploadwebsite/dist/, no more404.htmlSPA shim.Cleanup
/data/(42 MB of unused CSVs from the original 2022 scrape)./exports/(was already gitignored).arabterm.dbis now the single source of truth for everything the site renders.Test plan
gh-pages.ymlworkflow builds and deploys successfully on this branch/arabterm_water_engineering/, click through pages 2/9/unified_medical_dictionary/page/133/(last page of the big one)/water_engineering/directly — must redirect to/arabterm_water_engineering/🤖 Generated with Claude Code