Skip to content

Commit c9f0961

Browse files
committed
feat: migrate to Astro 7 + Vite 8 + Tailwind 4 + Vue 3
Replaces the legacy react-static site with a modern Astro-based build. The legacy code is preserved in _legacy-content/ for reference during the port (TODOs 49-58 in monorepo track remaining feature parity). ## Stack - Astro 7.1 static site framework - Vite 8 (Astro default) with @tailwindcss/vite 4 - Tailwind 4 (CSS-first config via @theme in src/styles/global.css) - Vue 3.5 via @astrojs/vue for interactive islands - TypeScript 5.6 (strict) - interscript-ts for live transliteration in the browser ## Pages - / (home) — hero, stats, features, quick-start code samples - /demo — live transliteration via interscript-ts - /maps — map catalogue + explorer - /authorities — table of authorities - /blog — post index - /about — mission, history, team - /docs — getting started ## Vue island MapExplorer.vue: dynamic interscript-ts import, real transliteration, engine status indicator, error display. Bundled IR maps load via import.meta.glob from public/maps/. ## Tests 15 vitest tests in test/ — site smoke tests + interscript-ts integration. ## Legacy content (preserved) _legacy-content/posts/ — 4 blog posts (.adoc) — TODO 51 _legacy-content/docs/ — 6 docs sections (.adoc) — TODO 52 _legacy-content/map/ — legacy bundled map data ## Deploy GitHub Pages workflow (.github/workflows/deploy.yml) on main.
1 parent 0faf5e0 commit c9f0961

726 files changed

Lines changed: 2934186 additions & 28450 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitignore

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
tmp
2-
artifacts
3-
node_modules
4-
dist
1+
# Build output
2+
dist/
3+
.astro/
4+
5+
# Dependencies
6+
node_modules/
7+
8+
# Logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
512
yarn-error.log
6-
.idea
7-
public/maps/**
8-
!public/maps/.gitkeep
9-
map/*
10-
!map/.gitkeep
13+
14+
# Environment
15+
.env
16+
.env.production
17+
18+
# Editor / OS
19+
.DS_Store
20+
.idea/
21+
.vscode/
22+
*.swp
23+
24+
# Legacy react-static (kept in _legacy-content for reference)

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Interscript.org v2
2+
3+
Astro 7 + Vite 8 + Tailwind 4 + Vue 3 islands. Uses `interscript-ts` for live map exploration.
4+
5+
## Status
6+
7+
🚧 **Under active development.** Replaces the legacy `interscript/interscript.github.io` react-static site once feature parity is reached.
8+
9+
## Stack
10+
11+
- **Astro 7** — static site framework
12+
- **Vite 8** — bundler
13+
- **Tailwind 4** — styling (CSS-first config via `@theme` in `src/styles/global.css`)
14+
- **Vue 3** — interactive islands (`@astrojs/vue`)
15+
- **TypeScript 5.6**`astro check` for type safety
16+
17+
## Development
18+
19+
```bash
20+
npm ci
21+
npm run dev # http://localhost:4321
22+
npm run build # outputs to dist/
23+
npm run preview # preview build locally
24+
```
25+
26+
## Project structure
27+
28+
```
29+
src/
30+
├── layouts/
31+
│ └── Base.astro # HTML shell, nav, footer
32+
├── components/
33+
│ └── MapExplorer.vue # Vue island: live transliteration
34+
├── pages/
35+
│ ├── index.astro # Home
36+
│ ├── maps/index.astro # Map explorer
37+
│ └── docs/index.astro # Docs hub
38+
└── styles/
39+
└── global.css # Tailwind import + theme tokens
40+
```
41+
42+
## Roadmap
43+
44+
See [TODO.complete](https://github.com/interscript/interscript/tree/main/TODO.complete) for the migration checklist from the legacy site.
45+
46+
## License
47+
48+
BSD-2-Clause — Ribose Inc.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
= Integration with Ruby Applications
2+
3+
Interscript can be used as a Ruby Gem library to be integrated with other Ruby
4+
applications.
5+
6+
== Gemfile
7+
8+
You need to make sure your Gemfile contains the following lines:
9+
10+
[source,ruby]
11+
----
12+
source "https://rubygems.org"
13+
14+
gem "interscript", "~>2.0"
15+
----
16+
17+
== Requiring
18+
19+
In your codebase, if you don't do `Bundler.require`, you will need to add the
20+
following line:
21+
22+
[source,ruby]
23+
----
24+
require "interscript"
25+
----
26+
27+
== Listing all available maps
28+
29+
To list all available maps, one must execute the following code:
30+
31+
[source,ruby]
32+
----
33+
maps = Interscript.maps
34+
----
35+
36+
`maps` will be an array containing all Interscript maps by their name.
37+
38+
== Transliterating text
39+
40+
To transliterate test using a given map, like `bas-rus-Cyrl-Latn-2017-bss`,
41+
one must execute:
42+
43+
[source,ruby]
44+
----
45+
cache = {}
46+
input = "Хелло"
47+
output = Interscript.transliterate("bas-rus-Cyrl-Latn-2017-bss",
48+
input,
49+
cache)
50+
----
51+
52+
You should preserve the `cache` variable for performance reasons. It is optional,
53+
you don't need to (but should) supply it.
54+
55+
=== Using Ruby compiler
56+
57+
If performance is of utmost performance for your application and you want to
58+
sacrifice a little bit of loading time for much better performance, you can use
59+
`Interscript::Compiler::Ruby` instead of `Interscript::Interpreter` (which is
60+
used by default).
61+
62+
[source,ruby]
63+
----
64+
require "interscript/compiler/ruby"
65+
66+
cache = {}
67+
input = "Хелло"
68+
output = Interscript.transliterate("bas-rus-Cyrl-Latn-2017-bss",
69+
input,
70+
cache,
71+
compiler: Interscript::Compiler::Ruby)
72+
----
73+
74+
=== Transliterating in reverse
75+
76+
To reverse a given string using a map with a name of a form:
77+
`bas-rus-Cyrl-Latn-2017-bss`, change places for Cyrl and Latn.
78+
79+
To reverse a given string using a map with a name of a form:
80+
`var-swe-Latn-Latn-2021`, append `-reverse` to its name.
81+
82+
Please note: this only works for Ruby implementation. Other implementations
83+
depend on the Ruby implementation for the purpose of compilation. For those,
84+
you need to compile the map using the Ruby implementation, but the name has
85+
to be given according to the above hint.

0 commit comments

Comments
 (0)