@notionx/create-notionx-app 1.0.0
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 +139 -0
- package/dist/answers.js +332 -0
- package/dist/answers.js.map +1 -0
- package/dist/cli-notionx.js +388 -0
- package/dist/cli-notionx.js.map +1 -0
- package/dist/cli-notionx.test.js +277 -0
- package/dist/cli-notionx.test.js.map +1 -0
- package/dist/diff.js +40 -0
- package/dist/diff.js.map +1 -0
- package/dist/diff.test.js +90 -0
- package/dist/diff.test.js.map +1 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -0
- package/dist/locale-add/apply.js +39 -0
- package/dist/locale-add/apply.js.map +1 -0
- package/dist/locale-add/format.js +38 -0
- package/dist/locale-add/format.js.map +1 -0
- package/dist/locale-add/list.js +44 -0
- package/dist/locale-add/list.js.map +1 -0
- package/dist/locale-add/list.test.js +45 -0
- package/dist/locale-add/list.test.js.map +1 -0
- package/dist/locale-add/plan.js +128 -0
- package/dist/locale-add/plan.js.map +1 -0
- package/dist/locale-add/validate.js +46 -0
- package/dist/locale-add/validate.js.map +1 -0
- package/dist/metadata.js +41 -0
- package/dist/metadata.js.map +1 -0
- package/dist/notion-translation-sources/apply.js +61 -0
- package/dist/notion-translation-sources/apply.js.map +1 -0
- package/dist/notion-translation-sources/index.js +3 -0
- package/dist/notion-translation-sources/index.js.map +1 -0
- package/dist/notion-translation-sources/plan.js +33 -0
- package/dist/notion-translation-sources/plan.js.map +1 -0
- package/dist/notionx-source.js +142 -0
- package/dist/notionx-source.js.map +1 -0
- package/dist/notionx-source.test.js +144 -0
- package/dist/notionx-source.test.js.map +1 -0
- package/dist/password.js +18 -0
- package/dist/password.js.map +1 -0
- package/dist/presets.js +83 -0
- package/dist/presets.js.map +1 -0
- package/dist/presets.test.js +50 -0
- package/dist/presets.test.js.map +1 -0
- package/dist/prompt.js +218 -0
- package/dist/prompt.js.map +1 -0
- package/dist/provision/cloudflare.js +236 -0
- package/dist/provision/cloudflare.js.map +1 -0
- package/dist/provision/dependencies.js +219 -0
- package/dist/provision/dependencies.js.map +1 -0
- package/dist/provision/index.js +681 -0
- package/dist/provision/index.js.map +1 -0
- package/dist/provision/index.test.js +54 -0
- package/dist/provision/index.test.js.map +1 -0
- package/dist/provision/inspect.js +109 -0
- package/dist/provision/inspect.js.map +1 -0
- package/dist/provision/inspect.test.js +75 -0
- package/dist/provision/inspect.test.js.map +1 -0
- package/dist/provision/notion.js +1981 -0
- package/dist/provision/notion.js.map +1 -0
- package/dist/provision/notion.test.js +542 -0
- package/dist/provision/notion.test.js.map +1 -0
- package/dist/provision/ntn-credentials.js +198 -0
- package/dist/provision/ntn-credentials.js.map +1 -0
- package/dist/provision/options.js +15 -0
- package/dist/provision/options.js.map +1 -0
- package/dist/provision/password-hash.js +78 -0
- package/dist/provision/password-hash.js.map +1 -0
- package/dist/provision/prompts.js +115 -0
- package/dist/provision/prompts.js.map +1 -0
- package/dist/provision/repair.js +48 -0
- package/dist/provision/repair.js.map +1 -0
- package/dist/provision/repair.test.js +141 -0
- package/dist/provision/repair.test.js.map +1 -0
- package/dist/provision/shell.js +84 -0
- package/dist/provision/shell.js.map +1 -0
- package/dist/provision/wire.js +78 -0
- package/dist/provision/wire.js.map +1 -0
- package/dist/registry/doctor.js +181 -0
- package/dist/registry/doctor.js.map +1 -0
- package/dist/registry/doctor.test.js +180 -0
- package/dist/registry/doctor.test.js.map +1 -0
- package/dist/registry/install.js +217 -0
- package/dist/registry/install.js.map +1 -0
- package/dist/registry/install.test.js +168 -0
- package/dist/registry/install.test.js.map +1 -0
- package/dist/registry/load-registry.js +24 -0
- package/dist/registry/load-registry.js.map +1 -0
- package/dist/registry/load-registry.test.js +59 -0
- package/dist/registry/load-registry.test.js.map +1 -0
- package/dist/registry/migration-planner.js +204 -0
- package/dist/registry/migration-planner.js.map +1 -0
- package/dist/registry/migration-planner.test.js +340 -0
- package/dist/registry/migration-planner.test.js.map +1 -0
- package/dist/registry/migrations-store.js +125 -0
- package/dist/registry/migrations-store.js.map +1 -0
- package/dist/registry/migrations-store.test.js +163 -0
- package/dist/registry/migrations-store.test.js.map +1 -0
- package/dist/registry/migrations-types.js +25 -0
- package/dist/registry/migrations-types.js.map +1 -0
- package/dist/registry/project-meta.js +84 -0
- package/dist/registry/project-meta.js.map +1 -0
- package/dist/registry/registry-items.js +354 -0
- package/dist/registry/registry-items.js.map +1 -0
- package/dist/registry/registry-items.test.js +99 -0
- package/dist/registry/registry-items.test.js.map +1 -0
- package/dist/registry/registry-store.js +232 -0
- package/dist/registry/registry-store.js.map +1 -0
- package/dist/registry/registry-store.test.js +136 -0
- package/dist/registry/registry-store.test.js.map +1 -0
- package/dist/registry/registry-types.js +18 -0
- package/dist/registry/registry-types.js.map +1 -0
- package/dist/registry/registry-types.test.js +146 -0
- package/dist/registry/registry-types.test.js.map +1 -0
- package/dist/registry/render-content-source-files.js +158 -0
- package/dist/registry/render-content-source-files.js.map +1 -0
- package/dist/registry/render-multi-source.js +296 -0
- package/dist/registry/render-multi-source.js.map +1 -0
- package/dist/registry/render-multi-source.test.js +110 -0
- package/dist/registry/render-multi-source.test.js.map +1 -0
- package/dist/registry/text-utils.js +42 -0
- package/dist/registry/text-utils.js.map +1 -0
- package/dist/registry/uninstall.js +250 -0
- package/dist/registry/uninstall.js.map +1 -0
- package/dist/registry/uninstall.test.js +264 -0
- package/dist/registry/uninstall.test.js.map +1 -0
- package/dist/registry/update.js +280 -0
- package/dist/registry/update.js.map +1 -0
- package/dist/registry/update.test.js +229 -0
- package/dist/registry/update.test.js.map +1 -0
- package/dist/render.js +549 -0
- package/dist/render.js.map +1 -0
- package/dist/render.test.js +414 -0
- package/dist/render.test.js.map +1 -0
- package/dist/templates/.dev.vars.example.tmpl +32 -0
- package/dist/templates/.gitignore.tmpl +58 -0
- package/dist/templates/README.md.tmpl +417 -0
- package/dist/templates/app/[slug]/page.tsx.tmpl +55 -0
- package/dist/templates/app/admin/account/page.tsx.tmpl +18 -0
- package/dist/templates/app/admin/content-models/page.tsx.tmpl +6 -0
- package/dist/templates/app/admin/layout.tsx.tmpl +90 -0
- package/dist/templates/app/admin/loading.tsx.tmpl +6 -0
- package/dist/templates/app/admin/page.tsx.tmpl +17 -0
- package/dist/templates/app/api/auth/google/callback/route.ts.tmpl +3 -0
- package/dist/templates/app/api/auth/google/route.ts.tmpl +3 -0
- package/dist/templates/app/api/auth/verify-email/route.ts.tmpl +3 -0
- package/dist/templates/app/api/auth/viewer/route.ts.tmpl +3 -0
- package/dist/templates/app/api/health/route.ts.tmpl +3 -0
- package/dist/templates/app/api/{{contentSourceId}}/[slug]/route.ts.tmpl +27 -0
- package/dist/templates/app/api/{{contentSourceId}}/route.ts.tmpl +18 -0
- package/dist/templates/app/globals.css.tmpl +109 -0
- package/dist/templates/app/layout.tsx.tmpl +56 -0
- package/dist/templates/app/login/page.tsx.tmpl +154 -0
- package/dist/templates/app/page.fallback.tsx.tmpl +31 -0
- package/dist/templates/app/page.tsx.tmpl +42 -0
- package/dist/templates/app/register/page.tsx.tmpl +138 -0
- package/dist/templates/app/{{contentSourceListPath}}/[slug]/page.tsx.tmpl +113 -0
- package/dist/templates/app/{{contentSourceListPath}}/page.tsx.tmpl +74 -0
- package/dist/templates/components/content/post-card.tsx.tmpl +80 -0
- package/dist/templates/components/notion-blocks.tsx.tmpl +668 -0
- package/dist/templates/components/page-blocks/feature-grid-block.tsx.tmpl +68 -0
- package/dist/templates/components/page-blocks/hero-block.tsx.tmpl +73 -0
- package/dist/templates/components/page-blocks/latest-posts-block.tsx.tmpl +59 -0
- package/dist/templates/components/page-blocks/story-block.tsx.tmpl +70 -0
- package/dist/templates/components/page-blocks.fallback.tsx.tmpl +17 -0
- package/dist/templates/components/page-blocks.tsx.tmpl +32 -0
- package/dist/templates/components/search/search-dialog.tsx.tmpl +171 -0
- package/dist/templates/components/site/locale-switcher.tsx.tmpl +65 -0
- package/dist/templates/components/site/site-footer.tsx.tmpl +106 -0
- package/dist/templates/components/site/site-header.tsx.tmpl +80 -0
- package/dist/templates/components/site/site-shell.tsx.tmpl +20 -0
- package/dist/templates/components/site/theme-bootstrap.tsx.tmpl +51 -0
- package/dist/templates/components/theme-provider.tsx.tmpl +14 -0
- package/dist/templates/components/theme-toggle.tsx.tmpl +38 -0
- package/dist/templates/components/ui/accordion.tsx.tmpl +56 -0
- package/dist/templates/components/ui/alert.tsx.tmpl +59 -0
- package/dist/templates/components/ui/aspect-ratio.tsx.tmpl +8 -0
- package/dist/templates/components/ui/avatar.tsx.tmpl +44 -0
- package/dist/templates/components/ui/badge.tsx.tmpl +33 -0
- package/dist/templates/components/ui/button.tsx.tmpl +56 -0
- package/dist/templates/components/ui/card.tsx.tmpl +61 -0
- package/dist/templates/components/ui/checkbox.tsx.tmpl +28 -0
- package/dist/templates/components/ui/dialog.tsx.tmpl +104 -0
- package/dist/templates/components/ui/dropdown-menu.tsx.tmpl +183 -0
- package/dist/templates/components/ui/input.tsx.tmpl +21 -0
- package/dist/templates/components/ui/label.tsx.tmpl +25 -0
- package/dist/templates/components/ui/popover.tsx.tmpl +30 -0
- package/dist/templates/components/ui/radio-group.tsx.tmpl +44 -0
- package/dist/templates/components/ui/select.tsx.tmpl +150 -0
- package/dist/templates/components/ui/separator.tsx.tmpl +30 -0
- package/dist/templates/components/ui/sheet.tsx.tmpl +125 -0
- package/dist/templates/components/ui/skeleton.tsx.tmpl +15 -0
- package/dist/templates/components/ui/sonner.tsx.tmpl +30 -0
- package/dist/templates/components/ui/switch.tsx.tmpl +29 -0
- package/dist/templates/components/ui/table.tsx.tmpl +107 -0
- package/dist/templates/components/ui/tabs.tsx.tmpl +55 -0
- package/dist/templates/components/ui/textarea.tsx.tmpl +24 -0
- package/dist/templates/components/ui/tooltip.tsx.tmpl +30 -0
- package/dist/templates/components.json.tmpl +21 -0
- package/dist/templates/env.d.ts.tmpl +32 -0
- package/dist/templates/lib/admin/actions.ts.tmpl +43 -0
- package/dist/templates/lib/admin/context.tsx.tmpl +209 -0
- package/dist/templates/lib/admin/nav.ts.tmpl +23 -0
- package/dist/templates/lib/auth.config.fallback.ts.tmpl +10 -0
- package/dist/templates/lib/auth.config.ts.tmpl +45 -0
- package/dist/templates/lib/blocks/translations.ts.tmpl +44 -0
- package/dist/templates/lib/blog/translations.ts.tmpl +52 -0
- package/dist/templates/lib/content/models.ts.tmpl +53 -0
- package/dist/templates/lib/i18n/config.ts.tmpl +18 -0
- package/dist/templates/lib/i18n/index.ts.tmpl +1 -0
- package/dist/templates/lib/locale-contract/built-in.ts.tmpl +19 -0
- package/dist/templates/lib/locale-contract/index.ts.tmpl +3 -0
- package/dist/templates/lib/locale-contract/paths.ts.tmpl +29 -0
- package/dist/templates/lib/pages/model.ts.tmpl +16 -0
- package/dist/templates/lib/pages/source.ts.tmpl +566 -0
- package/dist/templates/lib/pages/translations.ts.tmpl +34 -0
- package/dist/templates/lib/search/config.fallback.ts.tmpl +11 -0
- package/dist/templates/lib/search/config.ts.tmpl +25 -0
- package/dist/templates/lib/site/config.ts.tmpl +120 -0
- package/dist/templates/lib/site/request-env.ts.tmpl +71 -0
- package/dist/templates/lib/site/settings.fallback.ts.tmpl +21 -0
- package/dist/templates/lib/site/settings.ts.tmpl +320 -0
- package/dist/templates/lib/site/translations.ts.tmpl +30 -0
- package/dist/templates/lib/utils.ts.tmpl +9 -0
- package/dist/templates/migrations/0001_init.sql.tmpl +57 -0
- package/dist/templates/migrations/0002_admin_seed.sql.tmpl +30 -0
- package/dist/templates/migrations/0003_search_index.sql.tmpl +29 -0
- package/dist/templates/next.config.ts.tmpl +18 -0
- package/dist/templates/package.json.tmpl +40 -0
- package/dist/templates/shims/cloudflare-workers-empty.mjs +4 -0
- package/dist/templates/shims/next-headers-empty.mjs +4 -0
- package/dist/templates/tests/smoke.test.ts.tmpl +83 -0
- package/dist/templates/tsconfig.json.tmpl +31 -0
- package/dist/templates/vite.config.ts.tmpl +53 -0
- package/dist/templates/vitest.config.ts.tmpl +13 -0
- package/dist/templates/worker/index.ts.tmpl +52 -0
- package/dist/templates/wrangler.jsonc.tmpl +44 -0
- package/dist/ui-presets.js +60 -0
- package/dist/ui-presets.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Locale-aware blog lookup. Falls back to the default-locale
|
|
2
|
+
// translation when a target locale is missing (rule: hide).
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
pickTranslation,
|
|
6
|
+
hideWhenMissing,
|
|
7
|
+
mapNotionPageToLocalizedContentTranslation,
|
|
8
|
+
} from "@notionx/core";
|
|
9
|
+
import { i18n } from "@/lib/i18n";
|
|
10
|
+
import { blogContract } from "@/lib/locale-contract";
|
|
11
|
+
import type { NotionPageLike } from "@notionx/core";
|
|
12
|
+
|
|
13
|
+
export type BlogTranslationExtra = {
|
|
14
|
+
summary: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type BlogTranslation = NonNullable<
|
|
19
|
+
ReturnType<typeof mapNotionPageToLocalizedContentTranslation<BlogTranslationExtra>>
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export function mapBlogTranslation(page: NotionPageLike): BlogTranslation | null {
|
|
23
|
+
return mapNotionPageToLocalizedContentTranslation<BlogTranslationExtra>(page, {
|
|
24
|
+
fields: {
|
|
25
|
+
title: "Title",
|
|
26
|
+
source: "Source",
|
|
27
|
+
locale: "Locale",
|
|
28
|
+
slug: "Slug",
|
|
29
|
+
published: "Published",
|
|
30
|
+
},
|
|
31
|
+
extraFields: {
|
|
32
|
+
summary: "Description",
|
|
33
|
+
tags: { field: "Tags", kind: "tags" },
|
|
34
|
+
},
|
|
35
|
+
isValidLocale: (locale) =>
|
|
36
|
+
(i18n.supportedLocales as readonly string[]).includes(locale),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function pickBlogTranslation(
|
|
41
|
+
rows: readonly BlogTranslation[],
|
|
42
|
+
locale: string
|
|
43
|
+
) {
|
|
44
|
+
return pickTranslation(rows, locale, blogContract, i18n.defaultLocale);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function blogListForLocale(
|
|
48
|
+
rows: readonly BlogTranslation[],
|
|
49
|
+
locale: string
|
|
50
|
+
) {
|
|
51
|
+
return hideWhenMissing(rows, locale);
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Notion-backed content sources registered with the notionx
|
|
2
|
+
// registry. To add another content source, run `notionx add <id>`
|
|
3
|
+
// (or paste a new `defineContentSource({...})` block by hand and
|
|
4
|
+
// append the variable to `contentSources` / `managedContentSources`).
|
|
5
|
+
//
|
|
6
|
+
// `siteSettingsSource` and `blocksSource` are *singleton* internal
|
|
7
|
+
// sources that back `lib/site/settings.ts` and `components/page-blocks`
|
|
8
|
+
// respectively. They are conditionally included based on the
|
|
9
|
+
// `enableSiteSettings` / `enableBlocks` flags. They live in their
|
|
10
|
+
// own `NOTION_*_DATA_SOURCE_ID` env vars so they can be shared
|
|
11
|
+
// across content sources and edited without redeploying. They're
|
|
12
|
+
// intentionally NOT in `contentSources` because they have no
|
|
13
|
+
// public list/detail pages — only the home page, SEO metadata, and
|
|
14
|
+
// page-blocks consume them. Operators can still see them in
|
|
15
|
+
// `/admin/content-models` (they're in the package registry), and
|
|
16
|
+
// can revalidate their KV cache from there.
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
defineContentSource,
|
|
20
|
+
type ContentSource,
|
|
21
|
+
} from "@notionx/core/content";
|
|
22
|
+
|
|
23
|
+
// BEGIN generated-content-sources
|
|
24
|
+
// (Regenerated by `notionx add` / `notionx remove` / `notionx
|
|
25
|
+
// update`. Do not edit between these markers — the next update
|
|
26
|
+
// run will overwrite this block. To add a source by hand, use
|
|
27
|
+
// `notionx add <id>`.)
|
|
28
|
+
{{contentSourceDeclarations}}
|
|
29
|
+
// END generated-content-sources
|
|
30
|
+
|
|
31
|
+
// BEGIN generated-internal-sources
|
|
32
|
+
// (Regenerated by `notionx add` / `notionx remove` / `notionx
|
|
33
|
+
// update`. Do not edit between these markers.)
|
|
34
|
+
{{internalSourceDeclarations}}
|
|
35
|
+
// END generated-internal-sources
|
|
36
|
+
|
|
37
|
+
// `contentSources` is the public list shown in admin nav and
|
|
38
|
+
// iterated by search/revalidation. `managedContentSources`
|
|
39
|
+
// additionally includes any internal singleton sources
|
|
40
|
+
// (`blocksSource`, `siteSettingsSource`) so the worker registers
|
|
41
|
+
// them with `@notionx/core`'s `createNotionxWorker({ sources })`.
|
|
42
|
+
//
|
|
43
|
+
// `{{contentSourceSourcesVarNames}}` is a comma-joined list of
|
|
44
|
+
// `*Source` variable names for every installed content source.
|
|
45
|
+
// `{{internalSourceVarNames}}` is the same for internal sources.
|
|
46
|
+
export const contentSources = [
|
|
47
|
+
{{contentSourceSourcesVarNames}},
|
|
48
|
+
] as const;
|
|
49
|
+
export const managedContentSources = [
|
|
50
|
+
{{contentSourceSourcesVarNames}},
|
|
51
|
+
{{internalSourceVarNames}},
|
|
52
|
+
] as const;
|
|
53
|
+
export type ContentSourceId = (typeof contentSources)[number]["id"];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Project-level i18n config. Re-exports the runtime helpers from
|
|
2
|
+
// `@notionx/core` so app code, route handlers, and components share
|
|
3
|
+
// one set of locale constants. The supported locales are baked in
|
|
4
|
+
// at scaffold time; use `npx notionx locale add <locale>` to extend
|
|
5
|
+
// an existing project.
|
|
6
|
+
|
|
7
|
+
import { defineI18nConfig } from "@notionx/core/i18n";
|
|
8
|
+
|
|
9
|
+
export const i18n = defineI18nConfig({
|
|
10
|
+
defaultLocale: "{{defaultLocale}}",
|
|
11
|
+
supportedLocales: {{supportedLocalesJson}},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type AppLocale = (typeof i18n.supportedLocales)[number];
|
|
15
|
+
|
|
16
|
+
export function isAppLocale(value: string): value is AppLocale {
|
|
17
|
+
return (i18n.supportedLocales as readonly string[]).includes(value);
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./config";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Built-in locale contracts re-exported under a project-friendly
|
|
2
|
+
// import path. The list paths here are the canonical ones for the
|
|
3
|
+
// starter: the blog content source list and the page detail route.
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
blogContract as coreBlogContract,
|
|
7
|
+
pagesContract as corePagesContract,
|
|
8
|
+
blocksContract as coreBlocksContract,
|
|
9
|
+
siteSettingsContract as coreSiteSettingsContract,
|
|
10
|
+
} from "@notionx/core";
|
|
11
|
+
|
|
12
|
+
export const blogContract = {
|
|
13
|
+
...coreBlogContract,
|
|
14
|
+
listPath: "{{contentSourceListPath}}",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const pagesContract = corePagesContract;
|
|
18
|
+
export const blocksContract = coreBlocksContract;
|
|
19
|
+
export const siteSettingsContract = coreSiteSettingsContract;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Thin wrappers around the core path helpers that bake the project's
|
|
2
|
+
// default locale and the blog content source list path in. Route code
|
|
3
|
+
// should import from this module rather than the core helpers directly
|
|
4
|
+
// so the defaults stay consistent.
|
|
5
|
+
|
|
6
|
+
import { i18n } from "@/lib/i18n";
|
|
7
|
+
import {
|
|
8
|
+
localizedListPath as coreLocalizedListPath,
|
|
9
|
+
localizedDetailPathFor as coreLocalizedDetailPathFor,
|
|
10
|
+
stripLocalePrefix as coreStripLocalePrefix,
|
|
11
|
+
} from "@notionx/core";
|
|
12
|
+
import { blogContract } from "./built-in";
|
|
13
|
+
|
|
14
|
+
export function blogListPath(locale: string) {
|
|
15
|
+
return coreLocalizedListPath(locale, blogContract, i18n.defaultLocale);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function blogDetailPath(locale: string, slug: string) {
|
|
19
|
+
return coreLocalizedDetailPathFor(
|
|
20
|
+
locale,
|
|
21
|
+
slug,
|
|
22
|
+
blogContract,
|
|
23
|
+
i18n.defaultLocale
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function stripBlogLocale(path: string, locale: string) {
|
|
28
|
+
return coreStripLocalePrefix(path, locale);
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Notion-backed site pages. Pages are different from article-like
|
|
2
|
+
// content sources: they define the site's information architecture,
|
|
3
|
+
// navigation/footer visibility, route slugs, SEO copy, and editable
|
|
4
|
+
// body blocks for pages such as home, about, blog, and privacy.
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
defaultPagesDataSourceEnv,
|
|
8
|
+
defaultSitePageFields,
|
|
9
|
+
} from "@notionx/core/pages";
|
|
10
|
+
|
|
11
|
+
export const pageFields = {
|
|
12
|
+
...defaultSitePageFields,
|
|
13
|
+
blocks: "Blocks",
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export const pagesDataSourceEnv = defaultPagesDataSourceEnv;
|