From 995177b95857e80e15c62d04158f1116ef5600d9 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 17:11:56 +0800 Subject: [PATCH] update to fuxing.contented.dev --- README.md | 51 ++++++++++--------- example/contented.config.mjs | 2 +- example/docs/03-api.md | 4 +- example/docs/04-markdown.md | 10 ++-- .../fixtures/RemarkLink.md | 2 +- .../src/plugins/RemarkLink.unit.ts | 2 +- .../commands/contented/ContentedPreview.ts | 2 +- 7 files changed, 39 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 59b71be2..c5faadef 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,43 @@ # Contented -[Contented](https://contented.dev) is a prose bundler for your documentation with pipeline driven -authoring-oriented workflow to encourage developers authoring within its contextual Git repository. +[Contented](https://contented.fuxing.dev) is a prose bundler for your documentation with pipeline driven authoring-oriented workflow to encourage developers authoring within its contextual Git repository. -With a headless design of 1 config file `contented.config.mjs`, developers can start writing -their [markdown content](./04-markdown.md) and preview it on their localhost `contented generate --watch`. +With a headless design of 1 config file `contented.config.mjs`, +developers can start writing their [markdown content](./04-markdown.md) +and preview it on their localhost `contented generate --watch`. Choosing convention over configuration reduces HTML/UI clutter, allowing developers to focus on authoring. -Authored content can be continuously delivered (CD) into a hosted static site (e.g., GitHub Pages/Netlify/Vercel) for -preview `contented generate`. As code drift, so does documentation; this allows each pull request to have an -accompanying sharable preview of the documentation. With CD, it effectively shift-left your documentation workflow and -checks it is compilable and presentable. +Authored content can be continuously delivered (CD) into a hosted static site +(e.g., GitHub Pages/Netlify/Vercel) for preview `contented generate`. +As code drift, so does documentation; +this allows each pull request to have an accompanying sharable preview of the documentation. +With CD, it effectively shift-left your documentation workflow and checks it is compilable and presentable. -By encouraging authoring next to the source (in the same git repo), developers can contextually document changes as they -develop. All domain-specific changes will go into the `main` branch with one Git Pull Request. +By encouraging authoring next to the source (in the same git repo), +developers can contextually document changes as they develop. +All domain-specific changes will go into the `main` branch with one Git Pull Request. -With `contented build`, you can compile your prose into sources `index.js` and `*.json`. That output -into `./dist` to `npm publish` them into any registry of your choice, for you can -easily `npm i @your-scope/your-npm-package` and use the processed content on any of your downstream sites. Easily -pulling up-to-date content and prose from individual domain-specific repositories and re-presented. Think microservices, -but for your prose! +With `contented build`, you can compile your prose into sources `index.js` and `*.json`. +That output into `./dist` to `npm publish` them into any registry of your choice, +for you can easily `npm i @your-scope/your-npm-package` and use the processed content on any of your downstream sites. +Easily pulling up-to-date content and prose from individual domain-specific repositories and re-presented. +Think microservices, but for your prose! ## Motivation -If you don’t make it easy to get something done (authoring), nobody will go out of their way to get it done perfectly -every time. Turn it into a GitOps workflow and give people the necessary tools and power to get it done perfectly every -single time — everyone will get it done, as now there is no other way else to get it done. An efficient workflow -naturally satisfies. +If you don’t make it easy to get something done (authoring), +nobody will go out of their way to get it done perfectly every time. +Turn it into a GitOps workflow +and give people the necessary tools and power to get it done perfectly every single time — +everyone will get it done, as now there is no other way else to get it done. +An efficient workflow naturally satisfies. ### Just Another SSG? -**This is not a static site generator.** This is a prose processor workflow with a built-in static site generator. -The outcome we're trying to achieve is -this [@contentedjs/contented-example/dist](https://www.jsdelivr.com/package/npm/@contentedjs/contented-example) +**This is not a static site generator.** +This is a prose processor workflow with a built-in static site generator. +The outcome +we're trying to achieve is this [@contentedjs/contented-example/dist](https://www.jsdelivr.com/package/npm/@contentedjs/contented-example) > [See Contented Limitations](./09-Others/02-limitations.md) @@ -89,7 +94,7 @@ repo/ /** @type {import('@contentedjs/contented').ContentedConfig} */ export default { preview: { - url: 'https://contented.dev', + url: 'https://contented.fuxing.dev', name: 'Contented', github: { url: 'https://github.com/fuxingloh/contented', diff --git a/example/contented.config.mjs b/example/contented.config.mjs index bde68fed..df313033 100644 --- a/example/contented.config.mjs +++ b/example/contented.config.mjs @@ -1,7 +1,7 @@ /** @type {import('@contentedjs/contented').ContentedConfig} */ const config = { preview: { - url: 'https://contented.dev', + url: 'https://contented.fuxing.dev', name: 'Contented', github: { url: 'https://github.com/fuxingloh/contented', diff --git a/example/docs/03-api.md b/example/docs/03-api.md index e0ee6d6a..1f49cb70 100644 --- a/example/docs/03-api.md +++ b/example/docs/03-api.md @@ -31,7 +31,7 @@ configure your `package.json` with these fields: /** @type {import('@contentedjs/contented').ContentedConfig} */ const config = { preview: { - url: 'https://contented.dev', + url: 'https://contented.fuxing.dev', name: 'Contented', github: { url: 'https://github.com/fuxingloh/contented', @@ -145,7 +145,7 @@ export interface Pipeline { /** @type {import('@contentedjs/contented').ContentedConfig} */ module.exports = { preview: { - url: 'https://contented.dev', + url: 'https://contented.fuxing.dev', name: 'Contented', github: { url: 'https://github.com/fuxingloh/contented', diff --git a/example/docs/04-markdown.md b/example/docs/04-markdown.md index 0e296bca..b8225451 100644 --- a/example/docs/04-markdown.md +++ b/example/docs/04-markdown.md @@ -93,7 +93,7 @@ For example: /** @type {import('@contentedjs/contented').ContentedConfig} */ const config = { preview: { - url: 'https://preview.contented.dev', + url: 'https://preview.contented.fuxing.dev', name: 'Preview Contented', }, processor: { @@ -127,10 +127,10 @@ Pipeline Processed: -> /[path] (note docs/example-docs/ is remov /docs/example-docs/page-2 -> /page-2 /docs/example-docs/folder/page-3 -> /folder/page-3 -Preview: -> https://preview.contented.dev/[type]/[path] -/page-1 -> https://preview.contented.dev/example/page-1 -/page-2 -> https://preview.contented.dev/example/page-2 -/folder/page-3 -> https://preview.contented.dev/example/folder/page-3 +Preview: -> https://preview.contented.fuxing.dev/[type]/[path] +/page-1 -> https://preview.contented.fuxing.dev/example/page-1 +/page-2 -> https://preview.contented.fuxing.dev/example/page-2 +/folder/page-3 -> https://preview.contented.fuxing.dev/example/folder/page-3 Another Site: -> https://developer-docs.com/product-example/docs/[path] /page-1 -> https://developer-docs.com/product-example/docs/page-1 diff --git a/packages/contented-pipeline-md/fixtures/RemarkLink.md b/packages/contented-pipeline-md/fixtures/RemarkLink.md index 209914aa..007489f7 100644 --- a/packages/contented-pipeline-md/fixtures/RemarkLink.md +++ b/packages/contented-pipeline-md/fixtures/RemarkLink.md @@ -7,7 +7,7 @@ - [20-Heading/100-RemarkLinked.md](20-Heading/100-RemarkLinked.md) - [01-RemarkLinked.md](01-RemarkLinked.md) - [RemarkLink.md](RemarkLink.md) -- [Contented](https://contented.dev) +- [Contented](https://contented.fuxing.dev) - [20-Heading/100-RemarkLinked.md](./20-Heading/100-RemarkLinked.md) - [20-Heading/40-Section Title/200-DeepLink.md](./20-Heading/40-Section%20Title/200-DeepLink.md) - [01-RemarkLinked.md](./01-RemarkLinked.md) diff --git a/packages/contented-pipeline-md/src/plugins/RemarkLink.unit.ts b/packages/contented-pipeline-md/src/plugins/RemarkLink.unit.ts index 1bc6b055..f1c99231 100644 --- a/packages/contented-pipeline-md/src/plugins/RemarkLink.unit.ts +++ b/packages/contented-pipeline-md/src/plugins/RemarkLink.unit.ts @@ -30,7 +30,7 @@ it('should process RemarkLink.md', async () => { path: '/remark-link', fileId: expect.stringMatching(/[0-f]{64}/), modifiedDate: expect.any(Number), - html: '

RemarkLink.ts

\n

RemarkLink.ts will automatically link to other markdown files in your repository.

\n\n', + html: '

RemarkLink.ts

\n

RemarkLink.ts will automatically link to other markdown files in your repository.

\n\n', }, ]); }); diff --git a/packages/contented/src/commands/contented/ContentedPreview.ts b/packages/contented/src/commands/contented/ContentedPreview.ts index f774d421..cbf94b59 100644 --- a/packages/contented/src/commands/contented/ContentedPreview.ts +++ b/packages/contented/src/commands/contented/ContentedPreview.ts @@ -52,7 +52,7 @@ export class ContentedPreview { function generateEnvData(preview: PreviewConfig): string { return [ - `CONTENTED_PREVIEW_SITE_URL=${preview.url ?? 'https://contented.dev'}`, + `CONTENTED_PREVIEW_SITE_URL=${preview.url ?? 'https://contented.fuxing.dev'}`, `CONTENTED_PREVIEW_SITE_NAME=${preview?.name ?? 'Contented'}`, `CONTENTED_PREVIEW_GITHUB_URL=${preview?.github?.url ?? 'https://github.com/fuxingloh/contented'}`, ].join('\n');