Skip to content

Commit

Permalink
update to fuxing.contented.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh committed Feb 13, 2024
1 parent ff8b1b1 commit 995177b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 34 deletions.
51 changes: 28 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion example/contented.config.mjs
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
4 changes: 2 additions & 2 deletions example/docs/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
10 changes: 5 additions & 5 deletions example/docs/04-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/contented-pipeline-md/fixtures/RemarkLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ it('should process RemarkLink.md', async () => {
path: '/remark-link',
fileId: expect.stringMatching(/[0-f]{64}/),
modifiedDate: expect.any(Number),
html: '<nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a class="toc-link toc-link-h1" href="#remarklinkts">RemarkLink.ts</a><ol class="toc-level toc-level-2"><li class="toc-item toc-item-h2"><a class="toc-link toc-link-h2" href="#test-links">Test Links</a></li></ol></li></ol></nav><h1 id="remarklinkts"><a aria-hidden="true" tabindex="-1" href="#remarklinkts"><span class="icon icon-link"></span></a><code>RemarkLink.ts</code></h1>\n<p><code>RemarkLink.ts</code> will automatically link to other markdown files in your repository.</p>\n<h2 id="test-links"><a aria-hidden="true" tabindex="-1" href="#test-links"><span class="icon icon-link"></span></a>Test Links</h2>\n<ul>\n<li><a href="heading/remark-linked">20-Heading/100-RemarkLinked.md</a></li>\n<li><a href="remark-linked">01-RemarkLinked.md</a></li>\n<li><a href="remark-link">RemarkLink.md</a></li>\n<li><a href="https://contented.dev" rel="nofollow" target="_blank">Contented</a></li>\n<li><a href="heading/remark-linked">20-Heading/100-RemarkLinked.md</a></li>\n<li><a href="heading/section-title/deep-link">20-Heading/40-Section Title/200-DeepLink.md</a></li>\n<li><a href="remark-linked">01-RemarkLinked.md</a></li>\n</ul>',
html: '<nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a class="toc-link toc-link-h1" href="#remarklinkts">RemarkLink.ts</a><ol class="toc-level toc-level-2"><li class="toc-item toc-item-h2"><a class="toc-link toc-link-h2" href="#test-links">Test Links</a></li></ol></li></ol></nav><h1 id="remarklinkts"><a aria-hidden="true" tabindex="-1" href="#remarklinkts"><span class="icon icon-link"></span></a><code>RemarkLink.ts</code></h1>\n<p><code>RemarkLink.ts</code> will automatically link to other markdown files in your repository.</p>\n<h2 id="test-links"><a aria-hidden="true" tabindex="-1" href="#test-links"><span class="icon icon-link"></span></a>Test Links</h2>\n<ul>\n<li><a href="heading/remark-linked">20-Heading/100-RemarkLinked.md</a></li>\n<li><a href="remark-linked">01-RemarkLinked.md</a></li>\n<li><a href="remark-link">RemarkLink.md</a></li>\n<li><a href="https://contented.fuxing.dev" rel="nofollow" target="_blank">Contented</a></li>\n<li><a href="heading/remark-linked">20-Heading/100-RemarkLinked.md</a></li>\n<li><a href="heading/section-title/deep-link">20-Heading/40-Section Title/200-DeepLink.md</a></li>\n<li><a href="remark-linked">01-RemarkLinked.md</a></li>\n</ul>',
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 995177b

Please sign in to comment.