@softure-ai/blog 0.0.0-stage → 0.1.5
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/LICENSE +21 -0
- package/README.md +602 -2
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +5 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/command.d.ts +9 -0
- package/dist/cli/command.d.ts.map +1 -0
- package/dist/cli/command.js +40 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +5 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/run.d.ts +62 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +552 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/skill.d.ts +47 -0
- package/dist/cli/skill.d.ts.map +1 -0
- package/dist/cli/skill.js +221 -0
- package/dist/cli/skill.js.map +1 -0
- package/dist/content/article-file.d.ts +27 -0
- package/dist/content/article-file.d.ts.map +1 -0
- package/dist/content/article-file.js +179 -0
- package/dist/content/article-file.js.map +1 -0
- package/dist/contract.d.ts +77 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +5 -0
- package/dist/contract.js.map +1 -0
- package/dist/db/articles.d.ts +30 -0
- package/dist/db/articles.d.ts.map +1 -0
- package/dist/db/articles.js +138 -0
- package/dist/db/articles.js.map +1 -0
- package/dist/db/publish-run.d.ts +50 -0
- package/dist/db/publish-run.d.ts.map +1 -0
- package/dist/db/publish-run.js +168 -0
- package/dist/db/publish-run.js.map +1 -0
- package/dist/db/schema.d.ts +403 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +33 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/discovery/dates.d.ts +9 -0
- package/dist/discovery/dates.d.ts.map +1 -0
- package/dist/discovery/dates.js +19 -0
- package/dist/discovery/dates.js.map +1 -0
- package/dist/discovery/index.d.ts +8 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +11 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/discovery/indexnow.d.ts +11 -0
- package/dist/discovery/indexnow.d.ts.map +1 -0
- package/dist/discovery/indexnow.js +23 -0
- package/dist/discovery/indexnow.js.map +1 -0
- package/dist/discovery/refresh.d.ts +49 -0
- package/dist/discovery/refresh.d.ts.map +1 -0
- package/dist/discovery/refresh.js +55 -0
- package/dist/discovery/refresh.js.map +1 -0
- package/dist/discovery/related.d.ts +17 -0
- package/dist/discovery/related.d.ts.map +1 -0
- package/dist/discovery/related.js +28 -0
- package/dist/discovery/related.js.map +1 -0
- package/dist/discovery/rss.d.ts +30 -0
- package/dist/discovery/rss.d.ts.map +1 -0
- package/dist/discovery/rss.js +48 -0
- package/dist/discovery/rss.js.map +1 -0
- package/dist/discovery/sitemap.d.ts +25 -0
- package/dist/discovery/sitemap.d.ts.map +1 -0
- package/dist/discovery/sitemap.js +31 -0
- package/dist/discovery/sitemap.js.map +1 -0
- package/dist/discovery/submit.d.ts +44 -0
- package/dist/discovery/submit.d.ts.map +1 -0
- package/dist/discovery/submit.js +46 -0
- package/dist/discovery/submit.js.map +1 -0
- package/dist/index.d.ts +371 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/messages/en.d.ts +83 -0
- package/dist/messages/en.d.ts.map +1 -0
- package/dist/messages/en.js +83 -0
- package/dist/messages/en.js.map +1 -0
- package/dist/messages/index.d.ts +158 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +5 -0
- package/dist/messages/index.js.map +1 -0
- package/dist/messages/pl.d.ts +78 -0
- package/dist/messages/pl.d.ts.map +1 -0
- package/dist/messages/pl.js +78 -0
- package/dist/messages/pl.js.map +1 -0
- package/dist/next/context.d.ts +6 -0
- package/dist/next/context.d.ts.map +1 -0
- package/dist/next/context.js +27 -0
- package/dist/next/context.js.map +1 -0
- package/dist/next/data.d.ts +11 -0
- package/dist/next/data.d.ts.map +1 -0
- package/dist/next/data.js +40 -0
- package/dist/next/data.js.map +1 -0
- package/dist/next/discovery.d.ts +6 -0
- package/dist/next/discovery.d.ts.map +1 -0
- package/dist/next/discovery.js +49 -0
- package/dist/next/discovery.js.map +1 -0
- package/dist/next/index.d.ts +9 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +10 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/og-fonts.d.ts +6 -0
- package/dist/next/og-fonts.d.ts.map +1 -0
- package/dist/next/og-fonts.js +8 -0
- package/dist/next/og-fonts.js.map +1 -0
- package/dist/next/og-image.d.ts +36 -0
- package/dist/next/og-image.d.ts.map +1 -0
- package/dist/next/og-image.js +77 -0
- package/dist/next/og-image.js.map +1 -0
- package/dist/next/pages.d.ts +45 -0
- package/dist/next/pages.d.ts.map +1 -0
- package/dist/next/pages.js +189 -0
- package/dist/next/pages.js.map +1 -0
- package/dist/next/refresh.d.ts +9 -0
- package/dist/next/refresh.d.ts.map +1 -0
- package/dist/next/refresh.js +81 -0
- package/dist/next/refresh.js.map +1 -0
- package/dist/options.d.ts +320 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +184 -0
- package/dist/options.js.map +1 -0
- package/dist/pages/body.d.ts +18 -0
- package/dist/pages/body.d.ts.map +1 -0
- package/dist/pages/body.js +21 -0
- package/dist/pages/body.js.map +1 -0
- package/dist/pages/dates.d.ts +21 -0
- package/dist/pages/dates.d.ts.map +1 -0
- package/dist/pages/dates.js +24 -0
- package/dist/pages/dates.js.map +1 -0
- package/dist/pages/index.d.ts +7 -0
- package/dist/pages/index.d.ts.map +1 -0
- package/dist/pages/index.js +9 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/json-ld.d.ts +33 -0
- package/dist/pages/json-ld.d.ts.map +1 -0
- package/dist/pages/json-ld.js +95 -0
- package/dist/pages/json-ld.js.map +1 -0
- package/dist/pages/listing.d.ts +46 -0
- package/dist/pages/listing.d.ts.map +1 -0
- package/dist/pages/listing.js +57 -0
- package/dist/pages/listing.js.map +1 -0
- package/dist/pages/paths.d.ts +37 -0
- package/dist/pages/paths.d.ts.map +1 -0
- package/dist/pages/paths.js +61 -0
- package/dist/pages/paths.js.map +1 -0
- package/dist/pages/redirects.d.ts +57 -0
- package/dist/pages/redirects.d.ts.map +1 -0
- package/dist/pages/redirects.js +78 -0
- package/dist/pages/redirects.js.map +1 -0
- package/dist/proxy/index.d.ts +15 -0
- package/dist/proxy/index.d.ts.map +1 -0
- package/dist/proxy/index.js +60 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/quality/blocks.d.ts +21 -0
- package/dist/quality/blocks.d.ts.map +1 -0
- package/dist/quality/blocks.js +113 -0
- package/dist/quality/blocks.js.map +1 -0
- package/dist/quality/catalog.d.ts +10 -0
- package/dist/quality/catalog.d.ts.map +1 -0
- package/dist/quality/catalog.js +71 -0
- package/dist/quality/catalog.js.map +1 -0
- package/dist/quality/check-article.d.ts +34 -0
- package/dist/quality/check-article.d.ts.map +1 -0
- package/dist/quality/check-article.js +74 -0
- package/dist/quality/check-article.js.map +1 -0
- package/dist/quality/check-files.d.ts +23 -0
- package/dist/quality/check-files.d.ts.map +1 -0
- package/dist/quality/check-files.js +44 -0
- package/dist/quality/check-files.js.map +1 -0
- package/dist/quality/external-links.d.ts +19 -0
- package/dist/quality/external-links.d.ts.map +1 -0
- package/dist/quality/external-links.js +30 -0
- package/dist/quality/external-links.js.map +1 -0
- package/dist/quality/finding.d.ts +17 -0
- package/dist/quality/finding.d.ts.map +1 -0
- package/dist/quality/finding.js +15 -0
- package/dist/quality/finding.js.map +1 -0
- package/dist/quality/gate.d.ts +5 -0
- package/dist/quality/gate.d.ts.map +1 -0
- package/dist/quality/gate.js +10 -0
- package/dist/quality/gate.js.map +1 -0
- package/dist/quality/index.d.ts +15 -0
- package/dist/quality/index.d.ts.map +1 -0
- package/dist/quality/index.js +16 -0
- package/dist/quality/index.js.map +1 -0
- package/dist/quality/link-targets.d.ts +44 -0
- package/dist/quality/link-targets.d.ts.map +1 -0
- package/dist/quality/link-targets.js +91 -0
- package/dist/quality/link-targets.js.map +1 -0
- package/dist/quality/options.d.ts +113 -0
- package/dist/quality/options.d.ts.map +1 -0
- package/dist/quality/options.js +93 -0
- package/dist/quality/options.js.map +1 -0
- package/dist/quality/plugin.d.ts +34 -0
- package/dist/quality/plugin.d.ts.map +1 -0
- package/dist/quality/plugin.js +7 -0
- package/dist/quality/plugin.js.map +1 -0
- package/dist/quality/rules/blocks.d.ts +5 -0
- package/dist/quality/rules/blocks.d.ts.map +1 -0
- package/dist/quality/rules/blocks.js +35 -0
- package/dist/quality/rules/blocks.js.map +1 -0
- package/dist/quality/rules/images.d.ts +4 -0
- package/dist/quality/rules/images.d.ts.map +1 -0
- package/dist/quality/rules/images.js +33 -0
- package/dist/quality/rules/images.js.map +1 -0
- package/dist/quality/rules/input.d.ts +11 -0
- package/dist/quality/rules/input.d.ts.map +1 -0
- package/dist/quality/rules/input.js +2 -0
- package/dist/quality/rules/input.js.map +1 -0
- package/dist/quality/rules/links.d.ts +17 -0
- package/dist/quality/rules/links.d.ts.map +1 -0
- package/dist/quality/rules/links.js +46 -0
- package/dist/quality/rules/links.js.map +1 -0
- package/dist/quality/rules/structure.d.ts +13 -0
- package/dist/quality/rules/structure.d.ts.map +1 -0
- package/dist/quality/rules/structure.js +139 -0
- package/dist/quality/rules/structure.js.map +1 -0
- package/dist/quality/rules/style.d.ts +11 -0
- package/dist/quality/rules/style.d.ts.map +1 -0
- package/dist/quality/rules/style.js +129 -0
- package/dist/quality/rules/style.js.map +1 -0
- package/dist/quality/rules/ymyl.d.ts +5 -0
- package/dist/quality/rules/ymyl.d.ts.map +1 -0
- package/dist/quality/rules/ymyl.js +51 -0
- package/dist/quality/rules/ymyl.js.map +1 -0
- package/dist/quality/rulesets/en/ruleset.d.ts +3 -0
- package/dist/quality/rulesets/en/ruleset.d.ts.map +1 -0
- package/dist/quality/rulesets/en/ruleset.js +106 -0
- package/dist/quality/rulesets/en/ruleset.js.map +1 -0
- package/dist/quality/rulesets/index.d.ts +7 -0
- package/dist/quality/rulesets/index.d.ts.map +1 -0
- package/dist/quality/rulesets/index.js +7 -0
- package/dist/quality/rulesets/index.js.map +1 -0
- package/dist/quality/rulesets/pl/ruleset.d.ts +3 -0
- package/dist/quality/rulesets/pl/ruleset.d.ts.map +1 -0
- package/dist/quality/rulesets/pl/ruleset.js +114 -0
- package/dist/quality/rulesets/pl/ruleset.js.map +1 -0
- package/dist/quality/rulesets/types.d.ts +28 -0
- package/dist/quality/rulesets/types.d.ts.map +1 -0
- package/dist/quality/rulesets/types.js +2 -0
- package/dist/quality/rulesets/types.js.map +1 -0
- package/dist/quality/settings.d.ts +26 -0
- package/dist/quality/settings.d.ts.map +1 -0
- package/dist/quality/settings.js +32 -0
- package/dist/quality/settings.js.map +1 -0
- package/dist/quality/text.d.ts +43 -0
- package/dist/quality/text.d.ts.map +1 -0
- package/dist/quality/text.js +85 -0
- package/dist/quality/text.js.map +1 -0
- package/dist/render/glossary.d.ts +27 -0
- package/dist/render/glossary.d.ts.map +1 -0
- package/dist/render/glossary.js +71 -0
- package/dist/render/glossary.js.map +1 -0
- package/dist/render/images.d.ts +42 -0
- package/dist/render/images.d.ts.map +1 -0
- package/dist/render/images.js +84 -0
- package/dist/render/images.js.map +1 -0
- package/dist/render/index.d.ts +6 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +8 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/reading-time.d.ts +8 -0
- package/dist/render/reading-time.d.ts.map +1 -0
- package/dist/render/reading-time.js +17 -0
- package/dist/render/reading-time.js.map +1 -0
- package/dist/render/render-article.d.ts +97 -0
- package/dist/render/render-article.d.ts.map +1 -0
- package/dist/render/render-article.js +373 -0
- package/dist/render/render-article.js.map +1 -0
- package/dist/render/slugify-heading.d.ts +2 -0
- package/dist/render/slugify-heading.d.ts.map +1 -0
- package/dist/render/slugify-heading.js +21 -0
- package/dist/render/slugify-heading.js.map +1 -0
- package/dist/server/health.d.ts +3 -0
- package/dist/server/health.d.ts.map +1 -0
- package/dist/server/health.js +11 -0
- package/dist/server/health.js.map +1 -0
- package/dist/server/index.d.ts +10 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +13 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/og-fonts.d.ts +24 -0
- package/dist/server/og-fonts.d.ts.map +1 -0
- package/dist/server/og-fonts.js +85 -0
- package/dist/server/og-fonts.js.map +1 -0
- package/dist/server/options.d.ts +17 -0
- package/dist/server/options.d.ts.map +1 -0
- package/dist/server/options.js +56 -0
- package/dist/server/options.js.map +1 -0
- package/dist/sitemap.d.ts +11 -0
- package/dist/sitemap.d.ts.map +1 -0
- package/dist/sitemap.js +35 -0
- package/dist/sitemap.js.map +1 -0
- package/dist/ui/blog-article.d.ts +49 -0
- package/dist/ui/blog-article.d.ts.map +1 -0
- package/dist/ui/blog-article.js +45 -0
- package/dist/ui/blog-article.js.map +1 -0
- package/dist/ui/blog-glossary.d.ts +27 -0
- package/dist/ui/blog-glossary.d.ts.map +1 -0
- package/dist/ui/blog-glossary.js +20 -0
- package/dist/ui/blog-glossary.js.map +1 -0
- package/dist/ui/blog-layout.d.ts +31 -0
- package/dist/ui/blog-layout.d.ts.map +1 -0
- package/dist/ui/blog-layout.js +25 -0
- package/dist/ui/blog-layout.js.map +1 -0
- package/dist/ui/blog-listing.d.ts +15 -0
- package/dist/ui/blog-listing.d.ts.map +1 -0
- package/dist/ui/blog-listing.js +29 -0
- package/dist/ui/blog-listing.js.map +1 -0
- package/dist/ui/blog-method.d.ts +5 -0
- package/dist/ui/blog-method.d.ts.map +1 -0
- package/dist/ui/blog-method.js +21 -0
- package/dist/ui/blog-method.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/page-context.d.ts +15 -0
- package/dist/ui/page-context.d.ts.map +1 -0
- package/dist/ui/page-context.js +2 -0
- package/dist/ui/page-context.js.map +1 -0
- package/migrations/0001_create_articles.sql +67 -0
- package/migrations/README.md +8 -0
- package/module.json +28 -0
- package/package.json +98 -4
- package/skill/SKILL.md +72 -0
- package/skill/references/reviewer.md +39 -0
- package/skill/references/rules.md +122 -0
- package/skill/references/structure.md +69 -0
- package/skill/references/template.md +86 -0
- package/src/cli/bin.ts +5 -0
- package/src/cli/command.ts +49 -0
- package/src/cli/index.ts +20 -0
- package/src/cli/run.ts +589 -0
- package/src/cli/skill.ts +242 -0
- package/src/content/article-file.ts +184 -0
- package/src/contract.ts +88 -0
- package/src/db/articles.ts +160 -0
- package/src/db/publish-run.ts +224 -0
- package/src/db/schema.ts +36 -0
- package/src/discovery/dates.ts +27 -0
- package/src/discovery/index.ts +18 -0
- package/src/discovery/indexnow.ts +25 -0
- package/src/discovery/refresh.ts +79 -0
- package/src/discovery/related.ts +35 -0
- package/src/discovery/rss.ts +77 -0
- package/src/discovery/sitemap.ts +59 -0
- package/src/discovery/submit.ts +69 -0
- package/src/index.ts +99 -0
- package/src/messages/en.ts +82 -0
- package/src/messages/index.ts +7 -0
- package/src/messages/pl.ts +77 -0
- package/src/next/context.ts +30 -0
- package/src/next/data.ts +55 -0
- package/src/next/discovery.ts +49 -0
- package/src/next/index.ts +25 -0
- package/src/next/next-modules.d.ts +15 -0
- package/src/next/og-fonts.ts +14 -0
- package/src/next/og-image.tsx +108 -0
- package/src/next/pages.tsx +251 -0
- package/src/next/refresh.ts +85 -0
- package/src/options.ts +224 -0
- package/src/pages/body.ts +38 -0
- package/src/pages/dates.ts +39 -0
- package/src/pages/index.ts +37 -0
- package/src/pages/json-ld.ts +120 -0
- package/src/pages/listing.ts +95 -0
- package/src/pages/paths.ts +84 -0
- package/src/pages/redirects.ts +120 -0
- package/src/proxy/index.ts +66 -0
- package/src/quality/blocks.ts +130 -0
- package/src/quality/catalog.ts +86 -0
- package/src/quality/check-article.ts +112 -0
- package/src/quality/check-files.ts +63 -0
- package/src/quality/external-links.ts +37 -0
- package/src/quality/finding.ts +29 -0
- package/src/quality/gate.ts +15 -0
- package/src/quality/index.ts +28 -0
- package/src/quality/link-targets.ts +107 -0
- package/src/quality/options.ts +105 -0
- package/src/quality/plugin.ts +43 -0
- package/src/quality/rules/blocks.ts +43 -0
- package/src/quality/rules/images.ts +34 -0
- package/src/quality/rules/input.ts +12 -0
- package/src/quality/rules/links.ts +56 -0
- package/src/quality/rules/structure.ts +137 -0
- package/src/quality/rules/style.ts +137 -0
- package/src/quality/rules/ymyl.ts +57 -0
- package/src/quality/rulesets/en/ruleset.ts +117 -0
- package/src/quality/rulesets/index.ts +9 -0
- package/src/quality/rulesets/pl/ruleset.ts +126 -0
- package/src/quality/rulesets/types.ts +31 -0
- package/src/quality/settings.ts +60 -0
- package/src/quality/text.ts +113 -0
- package/src/render/glossary.ts +103 -0
- package/src/render/images.ts +110 -0
- package/src/render/index.ts +29 -0
- package/src/render/reading-time.ts +18 -0
- package/src/render/render-article.ts +487 -0
- package/src/render/slugify-heading.ts +22 -0
- package/src/server/health.ts +12 -0
- package/src/server/index.ts +28 -0
- package/src/server/og-fonts.ts +102 -0
- package/src/server/options.ts +62 -0
- package/src/sitemap.ts +36 -0
- package/src/ui/blog-article.tsx +186 -0
- package/src/ui/blog-glossary.tsx +104 -0
- package/src/ui/blog-layout.tsx +89 -0
- package/src/ui/blog-listing.tsx +95 -0
- package/src/ui/blog-method.tsx +34 -0
- package/src/ui/index.ts +8 -0
- package/src/ui/page-context.ts +17 -0
- package/styles.css +498 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
export declare const MODULE_ID = "blog";
|
|
2
|
+
/**
|
|
3
|
+
* The rate limit bucket of the cache refresh route (`refreshBlogCache`), to spread into
|
|
4
|
+
* `security({ buckets })`: requests per client address, counted before the secret is checked. A
|
|
5
|
+
* publish sends one; the limit leaves room for a few retries and stops guessing.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BLOG_RATE_LIMIT_BUCKETS: {
|
|
8
|
+
readonly "blog-refresh": {
|
|
9
|
+
readonly limit: 10;
|
|
10
|
+
readonly windowMinutes: 15;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Enables the blog in `softure.config.ts`: `blog()`, or with options
|
|
15
|
+
* `blog({ brand: { name: "Example" }, methodPage: true, fields: z.object({ scenario: z.string().optional() }) })`.
|
|
16
|
+
* Pages mount under `routes` (`index` `/blog`, `glossary` `/blog/glossary`, `method` `/blog/how-we-write`,
|
|
17
|
+
* `rss` `/blog/rss.xml`). With `seo()` listed too, `blogSitemap()` feeds its sitemap and a publish pings IndexNow.
|
|
18
|
+
* With `security()` listed and `refreshBlogCache` mounted at `refresh` (`/api/blog/refresh`), a publish from
|
|
19
|
+
* the command refreshes the running app's cache.
|
|
20
|
+
*/
|
|
21
|
+
export declare const blog: import("@softure-ai/core").ModuleFactory<{
|
|
22
|
+
index: string;
|
|
23
|
+
glossary: string;
|
|
24
|
+
method: string;
|
|
25
|
+
rss: string;
|
|
26
|
+
refresh: string;
|
|
27
|
+
}, {
|
|
28
|
+
kinds: {
|
|
29
|
+
article: string;
|
|
30
|
+
term: string;
|
|
31
|
+
};
|
|
32
|
+
statuses: {
|
|
33
|
+
draft: string;
|
|
34
|
+
published: string;
|
|
35
|
+
withdrawn: string;
|
|
36
|
+
};
|
|
37
|
+
render: {
|
|
38
|
+
footnotesHeading: string;
|
|
39
|
+
footnoteLabel: string;
|
|
40
|
+
backToText: string;
|
|
41
|
+
opensInNewTab: string;
|
|
42
|
+
tableOfContents: string;
|
|
43
|
+
};
|
|
44
|
+
pages: {
|
|
45
|
+
blogTitle: string;
|
|
46
|
+
blogDescription: string;
|
|
47
|
+
titleWithBrand: string;
|
|
48
|
+
empty: string;
|
|
49
|
+
otherCluster: string;
|
|
50
|
+
startHere: string;
|
|
51
|
+
readingTime: string;
|
|
52
|
+
updatedOn: string;
|
|
53
|
+
breadcrumbs: string;
|
|
54
|
+
published: string;
|
|
55
|
+
updated: string;
|
|
56
|
+
currentAsOf: string;
|
|
57
|
+
readingTimeLabel: string;
|
|
58
|
+
contents: string;
|
|
59
|
+
summary: string;
|
|
60
|
+
faq: string;
|
|
61
|
+
sources: string;
|
|
62
|
+
signature: string;
|
|
63
|
+
methodLink: string;
|
|
64
|
+
disclaimerLabel: string;
|
|
65
|
+
glossaryLink: string;
|
|
66
|
+
glossaryTeaser: string;
|
|
67
|
+
readNext: string;
|
|
68
|
+
};
|
|
69
|
+
glossary: {
|
|
70
|
+
title: string;
|
|
71
|
+
description: string;
|
|
72
|
+
empty: string;
|
|
73
|
+
explainedIn: string;
|
|
74
|
+
allTerms: string;
|
|
75
|
+
};
|
|
76
|
+
method: {
|
|
77
|
+
title: string;
|
|
78
|
+
description: string;
|
|
79
|
+
whoTitle: string;
|
|
80
|
+
whoBody: string;
|
|
81
|
+
factsTitle: string;
|
|
82
|
+
factsBody: string;
|
|
83
|
+
sourcesTitle: string;
|
|
84
|
+
sourcesBody: string;
|
|
85
|
+
checksTitle: string;
|
|
86
|
+
checksBody: string;
|
|
87
|
+
correctionsTitle: string;
|
|
88
|
+
correctionsBody: string;
|
|
89
|
+
};
|
|
90
|
+
gone: {
|
|
91
|
+
title: string;
|
|
92
|
+
heading: string;
|
|
93
|
+
body: string;
|
|
94
|
+
link: string;
|
|
95
|
+
};
|
|
96
|
+
feed: {
|
|
97
|
+
unavailable: string;
|
|
98
|
+
};
|
|
99
|
+
og: {
|
|
100
|
+
alt: string;
|
|
101
|
+
};
|
|
102
|
+
}, import("zod").ZodObject<{
|
|
103
|
+
contentDir: import("zod").ZodDefault<import("zod").ZodString>;
|
|
104
|
+
reservedSlugs: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
105
|
+
fields: import("zod").ZodOptional<import("zod").ZodCustom<import("./options.js").BlogFieldsSchema, import("./options.js").BlogFieldsSchema>>;
|
|
106
|
+
brand: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
107
|
+
name: import("zod").ZodString;
|
|
108
|
+
colors: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
109
|
+
background: import("zod").ZodOptional<import("zod").ZodString>;
|
|
110
|
+
foreground: import("zod").ZodOptional<import("zod").ZodString>;
|
|
111
|
+
accent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
+
}, import("zod/v4/core").$strict>>;
|
|
113
|
+
fonts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
114
|
+
name: import("zod").ZodString;
|
|
115
|
+
weight: import("zod").ZodDefault<import("zod").ZodCustom<200 | 600 | 700 | 300 | 100 | 400 | 500 | 800 | 900, 200 | 600 | 700 | 300 | 100 | 400 | 500 | 800 | 900>>;
|
|
116
|
+
style: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
117
|
+
normal: "normal";
|
|
118
|
+
italic: "italic";
|
|
119
|
+
}>>;
|
|
120
|
+
src: import("zod").ZodString;
|
|
121
|
+
}, import("zod/v4/core").$strict>>>;
|
|
122
|
+
}, import("zod/v4/core").$strict>>;
|
|
123
|
+
methodPage: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
124
|
+
disclaimer: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
125
|
+
en: import("zod").ZodString;
|
|
126
|
+
pl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
+
}, import("zod/v4/core").$strict>>;
|
|
128
|
+
clusters: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
|
129
|
+
en: import("zod").ZodString;
|
|
130
|
+
pl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
}, import("zod/v4/core").$strict>>>;
|
|
132
|
+
blocks: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodCustom<import("./render/render-article.js").BlockPlugin<unknown>, import("./render/render-article.js").BlockPlugin<unknown>>>>;
|
|
133
|
+
siteHosts: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
134
|
+
images: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
135
|
+
hosts: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
136
|
+
dimensions: import("zod").ZodCustom<(src: string) => import("./render/images.js").ImageDimensions | null, (src: string) => import("./render/images.js").ImageDimensions | null>;
|
|
137
|
+
}, import("zod/v4/core").$strict>>;
|
|
138
|
+
revalidateSeconds: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
139
|
+
quality: import("zod").ZodDefault<import("zod").ZodType<false | {
|
|
140
|
+
language: "en" | "pl";
|
|
141
|
+
ymyl: {
|
|
142
|
+
ownCalculationMark: string | null;
|
|
143
|
+
} | null;
|
|
144
|
+
voice: {
|
|
145
|
+
forbidFirstPersonSingular: boolean;
|
|
146
|
+
phrases: {
|
|
147
|
+
id: string;
|
|
148
|
+
pattern: RegExp;
|
|
149
|
+
message: string;
|
|
150
|
+
severity: "error" | "warning";
|
|
151
|
+
}[];
|
|
152
|
+
};
|
|
153
|
+
limits: {
|
|
154
|
+
words: {
|
|
155
|
+
article: {
|
|
156
|
+
min: number;
|
|
157
|
+
max: number;
|
|
158
|
+
};
|
|
159
|
+
term: {
|
|
160
|
+
min: number;
|
|
161
|
+
max: number;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
leadWords: {
|
|
165
|
+
article: number;
|
|
166
|
+
term: number;
|
|
167
|
+
};
|
|
168
|
+
answerWords: number;
|
|
169
|
+
internalLinks: {
|
|
170
|
+
article: number;
|
|
171
|
+
term: number;
|
|
172
|
+
};
|
|
173
|
+
staleAfterDays: number;
|
|
174
|
+
titleChars: number;
|
|
175
|
+
descriptionChars: {
|
|
176
|
+
min: number;
|
|
177
|
+
max: number;
|
|
178
|
+
};
|
|
179
|
+
wordsPerDash: number;
|
|
180
|
+
wordsPerBold: number;
|
|
181
|
+
sentenceWords: number;
|
|
182
|
+
};
|
|
183
|
+
severity: Record<string, "error" | "warning" | "off">;
|
|
184
|
+
paths: {
|
|
185
|
+
articles: string;
|
|
186
|
+
terms: string;
|
|
187
|
+
};
|
|
188
|
+
ownOrigins: string[];
|
|
189
|
+
privateRouteSegments: string[];
|
|
190
|
+
plugins: import("./quality/plugin.js").QualityPlugin[];
|
|
191
|
+
blocks: import("./render/render-article.js").BlockPlugin<unknown>[];
|
|
192
|
+
appDir?: string | undefined;
|
|
193
|
+
}, false | {
|
|
194
|
+
language?: "en" | "pl" | undefined;
|
|
195
|
+
ymyl?: boolean | {
|
|
196
|
+
ownCalculationMark?: string | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
voice?: {
|
|
199
|
+
forbidFirstPersonSingular?: boolean | undefined;
|
|
200
|
+
phrases?: {
|
|
201
|
+
id: string;
|
|
202
|
+
pattern: RegExp;
|
|
203
|
+
message: string;
|
|
204
|
+
severity?: "error" | "warning" | undefined;
|
|
205
|
+
}[] | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
limits?: {
|
|
208
|
+
words?: {
|
|
209
|
+
article?: {
|
|
210
|
+
min?: number | undefined;
|
|
211
|
+
max?: number | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
term?: {
|
|
214
|
+
min?: number | undefined;
|
|
215
|
+
max?: number | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
leadWords?: {
|
|
219
|
+
article?: number | undefined;
|
|
220
|
+
term?: number | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
answerWords?: number | undefined;
|
|
223
|
+
internalLinks?: {
|
|
224
|
+
article?: number | undefined;
|
|
225
|
+
term?: number | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
staleAfterDays?: number | undefined;
|
|
228
|
+
titleChars?: number | undefined;
|
|
229
|
+
descriptionChars?: {
|
|
230
|
+
min?: number | undefined;
|
|
231
|
+
max?: number | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
wordsPerDash?: number | undefined;
|
|
234
|
+
wordsPerBold?: number | undefined;
|
|
235
|
+
sentenceWords?: number | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
severity?: Record<string, "error" | "warning" | "off"> | undefined;
|
|
238
|
+
paths?: {
|
|
239
|
+
articles?: string | undefined;
|
|
240
|
+
terms?: string | undefined;
|
|
241
|
+
} | undefined;
|
|
242
|
+
ownOrigins?: string[] | undefined;
|
|
243
|
+
appDir?: string | undefined;
|
|
244
|
+
privateRouteSegments?: string[] | undefined;
|
|
245
|
+
plugins?: import("./quality/plugin.js").QualityPlugin[] | undefined;
|
|
246
|
+
blocks?: import("./render/render-article.js").BlockPlugin<unknown>[] | undefined;
|
|
247
|
+
}, import("zod/v4/core").$ZodTypeInternals<false | {
|
|
248
|
+
language: "en" | "pl";
|
|
249
|
+
ymyl: {
|
|
250
|
+
ownCalculationMark: string | null;
|
|
251
|
+
} | null;
|
|
252
|
+
voice: {
|
|
253
|
+
forbidFirstPersonSingular: boolean;
|
|
254
|
+
phrases: {
|
|
255
|
+
id: string;
|
|
256
|
+
pattern: RegExp;
|
|
257
|
+
message: string;
|
|
258
|
+
severity: "error" | "warning";
|
|
259
|
+
}[];
|
|
260
|
+
};
|
|
261
|
+
limits: {
|
|
262
|
+
words: {
|
|
263
|
+
article: {
|
|
264
|
+
min: number;
|
|
265
|
+
max: number;
|
|
266
|
+
};
|
|
267
|
+
term: {
|
|
268
|
+
min: number;
|
|
269
|
+
max: number;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
leadWords: {
|
|
273
|
+
article: number;
|
|
274
|
+
term: number;
|
|
275
|
+
};
|
|
276
|
+
answerWords: number;
|
|
277
|
+
internalLinks: {
|
|
278
|
+
article: number;
|
|
279
|
+
term: number;
|
|
280
|
+
};
|
|
281
|
+
staleAfterDays: number;
|
|
282
|
+
titleChars: number;
|
|
283
|
+
descriptionChars: {
|
|
284
|
+
min: number;
|
|
285
|
+
max: number;
|
|
286
|
+
};
|
|
287
|
+
wordsPerDash: number;
|
|
288
|
+
wordsPerBold: number;
|
|
289
|
+
sentenceWords: number;
|
|
290
|
+
};
|
|
291
|
+
severity: Record<string, "error" | "warning" | "off">;
|
|
292
|
+
paths: {
|
|
293
|
+
articles: string;
|
|
294
|
+
terms: string;
|
|
295
|
+
};
|
|
296
|
+
ownOrigins: string[];
|
|
297
|
+
privateRouteSegments: string[];
|
|
298
|
+
plugins: import("./quality/plugin.js").QualityPlugin[];
|
|
299
|
+
blocks: import("./render/render-article.js").BlockPlugin<unknown>[];
|
|
300
|
+
appDir?: string | undefined;
|
|
301
|
+
}, false | {
|
|
302
|
+
language?: "en" | "pl" | undefined;
|
|
303
|
+
ymyl?: boolean | {
|
|
304
|
+
ownCalculationMark?: string | undefined;
|
|
305
|
+
} | undefined;
|
|
306
|
+
voice?: {
|
|
307
|
+
forbidFirstPersonSingular?: boolean | undefined;
|
|
308
|
+
phrases?: {
|
|
309
|
+
id: string;
|
|
310
|
+
pattern: RegExp;
|
|
311
|
+
message: string;
|
|
312
|
+
severity?: "error" | "warning" | undefined;
|
|
313
|
+
}[] | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
limits?: {
|
|
316
|
+
words?: {
|
|
317
|
+
article?: {
|
|
318
|
+
min?: number | undefined;
|
|
319
|
+
max?: number | undefined;
|
|
320
|
+
} | undefined;
|
|
321
|
+
term?: {
|
|
322
|
+
min?: number | undefined;
|
|
323
|
+
max?: number | undefined;
|
|
324
|
+
} | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
leadWords?: {
|
|
327
|
+
article?: number | undefined;
|
|
328
|
+
term?: number | undefined;
|
|
329
|
+
} | undefined;
|
|
330
|
+
answerWords?: number | undefined;
|
|
331
|
+
internalLinks?: {
|
|
332
|
+
article?: number | undefined;
|
|
333
|
+
term?: number | undefined;
|
|
334
|
+
} | undefined;
|
|
335
|
+
staleAfterDays?: number | undefined;
|
|
336
|
+
titleChars?: number | undefined;
|
|
337
|
+
descriptionChars?: {
|
|
338
|
+
min?: number | undefined;
|
|
339
|
+
max?: number | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
wordsPerDash?: number | undefined;
|
|
342
|
+
wordsPerBold?: number | undefined;
|
|
343
|
+
sentenceWords?: number | undefined;
|
|
344
|
+
} | undefined;
|
|
345
|
+
severity?: Record<string, "error" | "warning" | "off"> | undefined;
|
|
346
|
+
paths?: {
|
|
347
|
+
articles?: string | undefined;
|
|
348
|
+
terms?: string | undefined;
|
|
349
|
+
} | undefined;
|
|
350
|
+
ownOrigins?: string[] | undefined;
|
|
351
|
+
appDir?: string | undefined;
|
|
352
|
+
privateRouteSegments?: string[] | undefined;
|
|
353
|
+
plugins?: import("./quality/plugin.js").QualityPlugin[] | undefined;
|
|
354
|
+
blocks?: import("./render/render-article.js").BlockPlugin<unknown>[] | undefined;
|
|
355
|
+
}>>>;
|
|
356
|
+
skill: import("zod").ZodDefault<import("zod").ZodObject<{
|
|
357
|
+
sections: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
358
|
+
title: import("zod").ZodString;
|
|
359
|
+
body: import("zod").ZodString;
|
|
360
|
+
}, import("zod/v4/core").$strict>>>;
|
|
361
|
+
}, import("zod/v4/core").$strict>>;
|
|
362
|
+
}, import("zod/v4/core").$strict>>;
|
|
363
|
+
export { BLOG_ARTICLE_KINDS, BLOG_ARTICLE_STATUSES, type BlogArticle, type BlogArticleContent, type BlogArticleInput, type BlogArticleKind, type BlogArticleState, type BlogArticleStatus, type BlogFaqEntry, type BlogFields, type BlogPublishAction, type BlogPublishResult, type BlogSlugErrorCode, type BlogSource, } from "./contract.js";
|
|
364
|
+
export { blogMessages, type BlogMessages } from "./messages/index.js";
|
|
365
|
+
export { DEFAULT_CONTENT_DIR, DEFAULT_REVALIDATE_SECONDS, FRONTMATTER_KEYS, type BlogFieldsParseResult, type BlogFieldsSchema, type BlogOptions, type BlogOptionsInput, type BlogSkillSection, type LocalizedText, } from "./options.js";
|
|
366
|
+
export { articles, blogSchema, slugHistory } from "./db/schema.js";
|
|
367
|
+
export type { BlogSitemapEntry } from "./discovery/sitemap.js";
|
|
368
|
+
export { blogSitemap, readBlogSitemap } from "./sitemap.js";
|
|
369
|
+
/** Builds a voice phrase for `blog({ quality: { voice: { phrases } } })` in the config. */
|
|
370
|
+
export { wordPattern } from "./quality/text.js";
|
|
371
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS,SAAS,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;CAE1B,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAoCf,CAAC;AAEH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5D,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Public API of @softure-ai/blog: the module factory for softure.config.ts, its options, the content
|
|
2
|
+
// contract and the tables. Parsing article files, the store, the publish run and the read functions
|
|
3
|
+
// are in `@softure-ai/blog/server`, the `softure-blog` command in `/cli`.
|
|
4
|
+
import { defineModule, resolveMigrationsDir } from "@softure-ai/core";
|
|
5
|
+
import { blogMessages } from "./messages/index.js";
|
|
6
|
+
import { BLOG_REFRESH_RATE_LIMIT_BUCKET, BLOG_REFRESH_SECRET_ENV } from "./discovery/refresh.js";
|
|
7
|
+
import { blogOptionsSchema } from "./options.js";
|
|
8
|
+
import { checkArticlesTable } from "./server/health.js";
|
|
9
|
+
export const MODULE_ID = "blog";
|
|
10
|
+
/**
|
|
11
|
+
* The rate limit bucket of the cache refresh route (`refreshBlogCache`), to spread into
|
|
12
|
+
* `security({ buckets })`: requests per client address, counted before the secret is checked. A
|
|
13
|
+
* publish sends one; the limit leaves room for a few retries and stops guessing.
|
|
14
|
+
*/
|
|
15
|
+
export const BLOG_RATE_LIMIT_BUCKETS = {
|
|
16
|
+
[BLOG_REFRESH_RATE_LIMIT_BUCKET]: { limit: 10, windowMinutes: 15 },
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Enables the blog in `softure.config.ts`: `blog()`, or with options
|
|
20
|
+
* `blog({ brand: { name: "Example" }, methodPage: true, fields: z.object({ scenario: z.string().optional() }) })`.
|
|
21
|
+
* Pages mount under `routes` (`index` `/blog`, `glossary` `/blog/glossary`, `method` `/blog/how-we-write`,
|
|
22
|
+
* `rss` `/blog/rss.xml`). With `seo()` listed too, `blogSitemap()` feeds its sitemap and a publish pings IndexNow.
|
|
23
|
+
* With `security()` listed and `refreshBlogCache` mounted at `refresh` (`/api/blog/refresh`), a publish from
|
|
24
|
+
* the command refreshes the running app's cache.
|
|
25
|
+
*/
|
|
26
|
+
export const blog = defineModule({
|
|
27
|
+
manifest: {
|
|
28
|
+
id: MODULE_ID,
|
|
29
|
+
version: "0.1.5",
|
|
30
|
+
// seo is optional: with it the sitemap lists the texts and a publish pings IndexNow. security is
|
|
31
|
+
// optional too: only the cache refresh route needs it, for its rate limit.
|
|
32
|
+
dependsOn: { seo: "^0.1.0?", security: "^0.1.0?" },
|
|
33
|
+
dbSchema: "blog",
|
|
34
|
+
tables: ["articles", "slug_history"],
|
|
35
|
+
env: [
|
|
36
|
+
{
|
|
37
|
+
name: BLOG_REFRESH_SECRET_ENV,
|
|
38
|
+
required: false,
|
|
39
|
+
description: "Shared secret (at least 32 characters) of the cache refresh route refreshBlogCache, set for the running app and for softure-blog publish; without it a publish shows after revalidateSeconds.",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
switches: [],
|
|
43
|
+
routes: { index: "/blog", glossary: "/blog/glossary", method: "/blog/how-we-write", rss: "/blog/rss.xml", refresh: "/api/blog/refresh" },
|
|
44
|
+
mount: [
|
|
45
|
+
{ kind: "page", path: "app/blog/page.tsx", export: "BlogIndexPage" },
|
|
46
|
+
{ kind: "page", path: "app/blog/[slug]/page.tsx", export: "BlogArticlePage" },
|
|
47
|
+
{ kind: "route-handler", path: "app/blog/[slug]/opengraph-image.tsx", export: "BlogArticleOgImage" },
|
|
48
|
+
{ kind: "page", path: "app/blog/glossary/page.tsx", export: "GlossaryIndexPage" },
|
|
49
|
+
{ kind: "page", path: "app/blog/glossary/[slug]/page.tsx", export: "GlossaryTermPage" },
|
|
50
|
+
{ kind: "page", path: "app/blog/how-we-write/page.tsx", export: "BlogMethodPage" },
|
|
51
|
+
{ kind: "route-handler", path: "app/blog/rss.xml/route.ts", export: "serveBlogRss" },
|
|
52
|
+
{ kind: "route-handler", path: "app/api/blog/refresh/route.ts", export: "refreshBlogCache" },
|
|
53
|
+
{ kind: "middleware", path: "proxy.ts", export: "createBlogRedirects" },
|
|
54
|
+
],
|
|
55
|
+
privacy: { exports: false, deletes: false },
|
|
56
|
+
},
|
|
57
|
+
messages: blogMessages,
|
|
58
|
+
options: blogOptionsSchema,
|
|
59
|
+
migrations: { dir: resolveMigrationsDir(import.meta.url, "../migrations/") },
|
|
60
|
+
health: checkArticlesTable,
|
|
61
|
+
});
|
|
62
|
+
export { BLOG_ARTICLE_KINDS, BLOG_ARTICLE_STATUSES, } from "./contract.js";
|
|
63
|
+
export { blogMessages } from "./messages/index.js";
|
|
64
|
+
export { DEFAULT_CONTENT_DIR, DEFAULT_REVALIDATE_SECONDS, FRONTMATTER_KEYS, } from "./options.js";
|
|
65
|
+
export { articles, blogSchema, slugHistory } from "./db/schema.js";
|
|
66
|
+
export { blogSitemap, readBlogSitemap } from "./sitemap.js";
|
|
67
|
+
/** Builds a voice phrase for `blog({ quality: { voice: { phrases } } })` in the config. */
|
|
68
|
+
export { wordPattern } from "./quality/text.js";
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qGAAqG;AAC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EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5D,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
kinds: {
|
|
3
|
+
article: string;
|
|
4
|
+
term: string;
|
|
5
|
+
};
|
|
6
|
+
statuses: {
|
|
7
|
+
draft: string;
|
|
8
|
+
published: string;
|
|
9
|
+
withdrawn: string;
|
|
10
|
+
};
|
|
11
|
+
render: {
|
|
12
|
+
footnotesHeading: string;
|
|
13
|
+
/** `{number}`: the footnote number. */
|
|
14
|
+
footnoteLabel: string;
|
|
15
|
+
backToText: string;
|
|
16
|
+
opensInNewTab: string;
|
|
17
|
+
tableOfContents: string;
|
|
18
|
+
};
|
|
19
|
+
pages: {
|
|
20
|
+
blogTitle: string;
|
|
21
|
+
blogDescription: string;
|
|
22
|
+
/** A page title with the brand: `{title}` the page, `{brand}` the site. */
|
|
23
|
+
titleWithBrand: string;
|
|
24
|
+
empty: string;
|
|
25
|
+
otherCluster: string;
|
|
26
|
+
startHere: string;
|
|
27
|
+
/** `{minutes}`: whole minutes, at least 1 ("min" does not inflect, so no plural forms). */
|
|
28
|
+
readingTime: string;
|
|
29
|
+
/** `{date}`: the day of the last change, on a card. */
|
|
30
|
+
updatedOn: string;
|
|
31
|
+
breadcrumbs: string;
|
|
32
|
+
published: string;
|
|
33
|
+
updated: string;
|
|
34
|
+
currentAsOf: string;
|
|
35
|
+
readingTimeLabel: string;
|
|
36
|
+
contents: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
faq: string;
|
|
39
|
+
sources: string;
|
|
40
|
+
/** `{brand}`: the site's name; shown only when the app sets a brand. */
|
|
41
|
+
signature: string;
|
|
42
|
+
methodLink: string;
|
|
43
|
+
disclaimerLabel: string;
|
|
44
|
+
glossaryLink: string;
|
|
45
|
+
glossaryTeaser: string;
|
|
46
|
+
readNext: string;
|
|
47
|
+
};
|
|
48
|
+
glossary: {
|
|
49
|
+
title: string;
|
|
50
|
+
description: string;
|
|
51
|
+
empty: string;
|
|
52
|
+
explainedIn: string;
|
|
53
|
+
allTerms: string;
|
|
54
|
+
};
|
|
55
|
+
method: {
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
whoTitle: string;
|
|
59
|
+
whoBody: string;
|
|
60
|
+
factsTitle: string;
|
|
61
|
+
factsBody: string;
|
|
62
|
+
sourcesTitle: string;
|
|
63
|
+
sourcesBody: string;
|
|
64
|
+
checksTitle: string;
|
|
65
|
+
checksBody: string;
|
|
66
|
+
correctionsTitle: string;
|
|
67
|
+
correctionsBody: string;
|
|
68
|
+
};
|
|
69
|
+
gone: {
|
|
70
|
+
title: string;
|
|
71
|
+
heading: string;
|
|
72
|
+
body: string;
|
|
73
|
+
link: string;
|
|
74
|
+
};
|
|
75
|
+
feed: {
|
|
76
|
+
/** The plain-text body of a 503 when the texts cannot be read. */
|
|
77
|
+
unavailable: string;
|
|
78
|
+
};
|
|
79
|
+
og: {
|
|
80
|
+
alt: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;QAYX,uCAAuC;;;;;;;;;QASvC,2EAA2E;;;;;QAK3E,2FAA2F;;QAE3F,uDAAuD;;;;;;;;;;;QAWvD,wEAAwE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAoCxE,kEAAkE;;;;;;CAMrE,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export const en = {
|
|
2
|
+
kinds: {
|
|
3
|
+
article: "Article",
|
|
4
|
+
term: "Glossary term",
|
|
5
|
+
},
|
|
6
|
+
statuses: {
|
|
7
|
+
draft: "Draft",
|
|
8
|
+
published: "Published",
|
|
9
|
+
withdrawn: "Withdrawn",
|
|
10
|
+
},
|
|
11
|
+
render: {
|
|
12
|
+
footnotesHeading: "Notes",
|
|
13
|
+
/** `{number}`: the footnote number. */
|
|
14
|
+
footnoteLabel: "Footnote {number}",
|
|
15
|
+
backToText: "Back to text",
|
|
16
|
+
opensInNewTab: "(opens in a new tab)",
|
|
17
|
+
tableOfContents: "Contents",
|
|
18
|
+
},
|
|
19
|
+
pages: {
|
|
20
|
+
blogTitle: "Blog",
|
|
21
|
+
blogDescription: "Articles that explain the topic step by step, with sources and the day the facts were checked.",
|
|
22
|
+
/** A page title with the brand: `{title}` the page, `{brand}` the site. */
|
|
23
|
+
titleWithBrand: "{title} | {brand}",
|
|
24
|
+
empty: "The first texts are on their way.",
|
|
25
|
+
otherCluster: "Other texts",
|
|
26
|
+
startHere: "Start here",
|
|
27
|
+
/** `{minutes}`: whole minutes, at least 1 ("min" does not inflect, so no plural forms). */
|
|
28
|
+
readingTime: "{minutes} min read",
|
|
29
|
+
/** `{date}`: the day of the last change, on a card. */
|
|
30
|
+
updatedOn: "Updated {date}",
|
|
31
|
+
breadcrumbs: "Breadcrumbs",
|
|
32
|
+
published: "Published",
|
|
33
|
+
updated: "Updated",
|
|
34
|
+
currentAsOf: "Current as of",
|
|
35
|
+
readingTimeLabel: "Reading time",
|
|
36
|
+
contents: "In this text",
|
|
37
|
+
summary: "In short",
|
|
38
|
+
faq: "Questions and answers",
|
|
39
|
+
sources: "Sources",
|
|
40
|
+
/** `{brand}`: the site's name; shown only when the app sets a brand. */
|
|
41
|
+
signature: "{brand} editorial team",
|
|
42
|
+
methodLink: "How our texts are made",
|
|
43
|
+
disclaimerLabel: "Disclaimer",
|
|
44
|
+
glossaryLink: "Glossary",
|
|
45
|
+
glossaryTeaser: "short definitions of the terms the texts use.",
|
|
46
|
+
readNext: "Read next",
|
|
47
|
+
},
|
|
48
|
+
glossary: {
|
|
49
|
+
title: "Glossary",
|
|
50
|
+
description: "Short definitions of the terms the texts use, each with the day it was checked and its sources.",
|
|
51
|
+
empty: "The first definitions are on their way.",
|
|
52
|
+
explainedIn: "Explained in these texts",
|
|
53
|
+
allTerms: "All terms",
|
|
54
|
+
},
|
|
55
|
+
method: {
|
|
56
|
+
title: "How our texts are made",
|
|
57
|
+
description: "Who writes the texts, where the facts come from and what is checked before a text is published.",
|
|
58
|
+
whoTitle: "Who writes",
|
|
59
|
+
whoBody: "The editorial team chooses every topic and signs every text with the site's name.",
|
|
60
|
+
factsTitle: "Where the facts come from",
|
|
61
|
+
factsBody: "Every number comes from a source listed under the text or from a calculation the text shows. Each text says on which day its facts were checked.",
|
|
62
|
+
sourcesTitle: "Sources",
|
|
63
|
+
sourcesBody: "We cite laws, official statistics and primary documents first, and link every source so you can check it yourself.",
|
|
64
|
+
checksTitle: "Checks before publishing",
|
|
65
|
+
checksBody: "Before a text goes live, automatic checks look at its structure, its links and its sources. A text that fails them is not published.",
|
|
66
|
+
correctionsTitle: "Corrections",
|
|
67
|
+
correctionsBody: "When a fact changes, we update the text and its date. A text that can no longer be corrected is withdrawn.",
|
|
68
|
+
},
|
|
69
|
+
gone: {
|
|
70
|
+
title: "Text withdrawn",
|
|
71
|
+
heading: "This text has been withdrawn",
|
|
72
|
+
body: "We took it down because it was no longer current or correct.",
|
|
73
|
+
link: "See the other texts on the blog",
|
|
74
|
+
},
|
|
75
|
+
feed: {
|
|
76
|
+
/** The plain-text body of a 503 when the texts cannot be read. */
|
|
77
|
+
unavailable: "The feed is unavailable for a moment. Try again in a few minutes.",
|
|
78
|
+
},
|
|
79
|
+
og: {
|
|
80
|
+
alt: "An article from the blog",
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA,MAAM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