mdorigin 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ That means `mdorigin` should own content semantics, while page rendering remains
23
23
  - extensionless routes render human-friendly HTML from the same files
24
24
  - `README.md`, `index.md`, and `SKILL.md` all fit into one routing model
25
25
  - the same core works in local preview and Cloudflare Workers
26
- - optional search is powered by [`indexbind`](https://github.com/jolestar/indexbind)
26
+ - optional search is powered by [`indexbind`](https://github.com/holon-run/indexbind)
27
27
 
28
28
  ## Install
29
29
 
@@ -87,7 +87,7 @@ The intended boundary is:
87
87
 
88
88
  ## Optional Search
89
89
 
90
- `mdorigin` can build a local retrieval bundle through the optional [`indexbind`](https://github.com/jolestar/indexbind) package. For the retrieval engine itself, see the `indexbind` docs: <https://indexbind.jolestar.workers.dev>.
90
+ `mdorigin` can build a local retrieval bundle through the optional [`indexbind`](https://github.com/holon-run/indexbind) package. For the retrieval engine itself, see the `indexbind` docs: <https://indexbind.jolestar.workers.dev>.
91
91
 
92
92
  ```bash
93
93
  npm install indexbind
@@ -127,7 +127,7 @@ Runtime endpoints:
127
127
 
128
128
  ## Docs
129
129
 
130
- - Docs site: <https://mdorigin.jolestar.workers.dev>
130
+ - Docs site: <https://mdorigin.holon.run>
131
131
  - Getting started: [`docs/site/guides/getting-started.md`](docs/site/guides/getting-started.md)
132
132
  - Routing model: [`docs/site/concepts/routing.md`](docs/site/concepts/routing.md)
133
133
  - Directory indexes: [`docs/site/concepts/directory-indexes.md`](docs/site/concepts/directory-indexes.md)
@@ -136,4 +136,4 @@ Runtime endpoints:
136
136
  - Search setup: [`docs/site/guides/getting-started.md`](docs/site/guides/getting-started.md#quick-start)
137
137
  - Cloudflare deployment: [`docs/site/guides/cloudflare.md`](docs/site/guides/cloudflare.md)
138
138
 
139
- The docs site at <https://mdorigin.jolestar.workers.dev> is deployed automatically from `main` with GitHub Actions.
139
+ The docs site at <https://mdorigin.holon.run> is deployed automatically from `main` with GitHub Actions.
@@ -48,6 +48,8 @@ export function createCloudflareWorker(manifest, options = {}) {
48
48
  siteConfig: manifest.siteConfig ?? {
49
49
  siteTitle: 'mdorigin',
50
50
  siteUrl: undefined,
51
+ locale: 'en',
52
+ messages: {},
51
53
  favicon: undefined,
52
54
  logo: undefined,
53
55
  showDate: true,
@@ -23,6 +23,9 @@ export async function runBuildIndexCommand(argv) {
23
23
  rootDir,
24
24
  dir,
25
25
  plugins: loadedConfig.plugins,
26
+ excludedDirectories: (loadedConfig.siteConfig.locales ?? [])
27
+ .filter((locale) => locale.contentBase !== '')
28
+ .map((locale) => locale.contentBase),
26
29
  });
27
30
  console.log(`updated ${result.updatedFiles.length} index file(s)`);
28
31
  if (result.skippedDirectories.length > 0) {
@@ -8,10 +8,23 @@ export interface IndexTransformContext {
8
8
  sourcePath?: string;
9
9
  siteConfig?: ResolvedSiteConfig;
10
10
  }
11
+ export interface PageLanguage {
12
+ code: string;
13
+ label: string;
14
+ /** Root-relative href for this language: the translated page when available, otherwise the language home. */
15
+ href: string;
16
+ current: boolean;
17
+ /** Whether a page-level translation exists for this language. */
18
+ translated: boolean;
19
+ }
11
20
  export interface PageRenderModel {
12
21
  kind: 'page' | 'listing';
13
22
  requestPath: string;
14
23
  sourcePath: string;
24
+ /** Effective UI locale for this request (frontmatter overrides not applied). */
25
+ locale: string;
26
+ /** Language switcher entries; empty for single-language sites. */
27
+ languages: PageLanguage[];
15
28
  siteTitle: string;
16
29
  siteDescription?: string;
17
30
  siteUrl?: string;