upcontent 0.0.0-stage → 0.1.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/.github/workflows/ci.yml +61 -0
- package/.github/workflows/deploy.yml +59 -0
- package/.github/workflows/publish.yml +75 -0
- package/.github/workflows/reusable-pages.yml +74 -0
- package/.upcontent/config.json +85 -0
- package/.upcontent/favicon.svg +4 -0
- package/.upcontent/logo.svg +6 -0
- package/.upcontent/portal.css +139 -0
- package/CONTEXT.md +25 -0
- package/Makefile +33 -0
- package/README.md +132 -2
- package/SHOWCASE.mdx +163 -0
- package/assets/readme/portal-home.png +0 -0
- package/assets/readme/portal-showcase.png +0 -0
- package/astro.config.mjs +167 -0
- package/customization/config-json.md +100 -0
- package/customization/content.md +62 -0
- package/customization/environment.md +43 -0
- package/customization/index.md +33 -0
- package/customization/navigation.md +57 -0
- package/customization/site-identity.md +43 -0
- package/customization/theme.md +47 -0
- package/deployment/github-pages.md +46 -0
- package/deployment/index.md +25 -0
- package/deployment/npm.md +39 -0
- package/deployment/static-hosts.md +34 -0
- package/getting-started/consumer-repository.md +156 -0
- package/getting-started/first-build.md +78 -0
- package/guides/authoring-content.md +105 -0
- package/guides/validate-your-site.md +58 -0
- package/package.json +40 -4
- package/scripts/upcontent-cli.mjs +111 -0
- package/scripts/verify-external-build.mjs +32 -0
- package/scripts/verify-golden-build.mjs +9 -0
- package/src/components/MermaidLoader.astro +304 -0
- package/src/components/PaletteShowcase.astro +122 -0
- package/src/components/StructuredDataCopy.astro +22 -0
- package/src/content/__mocks__/astro-content.ts +7 -0
- package/src/content/__mocks__/astro-loaders.ts +3 -0
- package/src/content/i18n/en.json +1 -0
- package/src/content.config.test.ts +209 -0
- package/src/content.config.ts +113 -0
- package/src/lib/content-blocklist.test.ts +47 -0
- package/src/lib/content-blocklist.ts +55 -0
- package/src/lib/doc-links.test.ts +62 -0
- package/src/lib/doc-links.ts +31 -0
- package/src/lib/mermaid-render.test.ts +42 -0
- package/src/lib/mermaid-render.ts +24 -0
- package/src/lib/portal-config.test.ts +153 -0
- package/src/lib/portal-config.ts +187 -0
- package/src/lib/portal-routes.test.ts +62 -0
- package/src/lib/portal-routes.ts +59 -0
- package/src/lib/product-identity.ts +2 -0
- package/src/lib/rehype-callouts.test.ts +69 -0
- package/src/lib/rehype-callouts.ts +61 -0
- package/src/lib/remark-doc-links.test.ts +50 -0
- package/src/lib/remark-doc-links.ts +21 -0
- package/src/lib/remark-strip-duplicate-title.test.ts +73 -0
- package/src/lib/remark-strip-duplicate-title.ts +37 -0
- package/src/lib/remark-structured-data-preview.test.ts +104 -0
- package/src/lib/remark-structured-data-preview.ts +66 -0
- package/src/lib/remark-wiki-links.test.ts +102 -0
- package/src/lib/remark-wiki-links.ts +112 -0
- package/src/lib/seo-sitemap.test.ts +37 -0
- package/src/lib/seo-sitemap.ts +54 -0
- package/src/lib/sidebar.test.ts +142 -0
- package/src/lib/sidebar.ts +114 -0
- package/src/lib/structured-data-tree.test.ts +75 -0
- package/src/lib/structured-data-tree.ts +55 -0
- package/src/overrides/Footer.astro +114 -0
- package/src/overrides/Head.astro +103 -0
- package/src/pages/robots.txt.ts +46 -0
- package/src/styles/callouts.css +29 -0
- package/src/styles/structured-data-preview.css +95 -0
- package/src/upcontent-cli.test.ts +36 -0
- package/test-fixtures/external-consumer/.upcontent/config.json +30 -0
- package/test-fixtures/external-consumer/.upcontent/favicon.svg +4 -0
- package/test-fixtures/external-consumer/.upcontent/logo.svg +4 -0
- package/test-fixtures/external-consumer/.upcontent/theme.css +4 -0
- package/test-fixtures/external-consumer/.upcontent-renderer/README.md +3 -0
- package/test-fixtures/external-consumer/README.md +6 -0
- package/test-fixtures/external-consumer/forbidden.md +5 -0
- package/test-fixtures/external-consumer/noindex.md +7 -0
- package/test-fixtures/external-consumer/public.md +6 -0
- package/tsconfig.json +7 -0
- package/vitest.config.ts +18 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Validate portal
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: validate-${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
validate:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repository
|
|
19
|
+
uses: actions/checkout@v5
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- name: Set up pnpm
|
|
24
|
+
uses: pnpm/action-setup@v4
|
|
25
|
+
with:
|
|
26
|
+
version: 10.20.0
|
|
27
|
+
|
|
28
|
+
- name: Set up Node.js
|
|
29
|
+
uses: actions/setup-node@v5
|
|
30
|
+
with:
|
|
31
|
+
node-version: 22
|
|
32
|
+
cache: pnpm
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: pnpm install --frozen-lockfile
|
|
36
|
+
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: pnpm test
|
|
39
|
+
|
|
40
|
+
- name: Run Astro diagnostics
|
|
41
|
+
run: pnpm check
|
|
42
|
+
|
|
43
|
+
- name: Check golden artifact
|
|
44
|
+
run: make check-golden
|
|
45
|
+
|
|
46
|
+
- name: Check golden runtime assets
|
|
47
|
+
run: |
|
|
48
|
+
test -f dist/index.html
|
|
49
|
+
test -f dist/pagefind/pagefind.js
|
|
50
|
+
test -f dist/upcontent-assets/favicon.svg
|
|
51
|
+
|
|
52
|
+
- name: Build external consumer fixture
|
|
53
|
+
run: make check-external
|
|
54
|
+
|
|
55
|
+
- name: Check diff hygiene
|
|
56
|
+
env:
|
|
57
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
|
58
|
+
run: |
|
|
59
|
+
git diff --check "$BASE_SHA" HEAD
|
|
60
|
+
git diff --exit-code
|
|
61
|
+
test -z "$(git status --porcelain --untracked-files=all)"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Deploy documentation portal
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check out repository
|
|
22
|
+
uses: actions/checkout@v5
|
|
23
|
+
|
|
24
|
+
- name: Set up Pages
|
|
25
|
+
id: pages
|
|
26
|
+
uses: actions/configure-pages@v5
|
|
27
|
+
|
|
28
|
+
- name: Set up pnpm
|
|
29
|
+
uses: pnpm/action-setup@v4
|
|
30
|
+
with:
|
|
31
|
+
version: 10.20.0
|
|
32
|
+
|
|
33
|
+
- name: Set up Node.js
|
|
34
|
+
uses: actions/setup-node@v5
|
|
35
|
+
with:
|
|
36
|
+
node-version: 22
|
|
37
|
+
cache: pnpm
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: pnpm install --frozen-lockfile
|
|
41
|
+
|
|
42
|
+
- name: Build static portal
|
|
43
|
+
run: make build CONTENT_PATH=. REPO_URL="https://github.com/${{ github.repository }}" BASE_PATH="${{ steps.pages.outputs.base_path }}" SITE_URL="${{ steps.pages.outputs.origin }}"
|
|
44
|
+
|
|
45
|
+
- name: Upload static artifact
|
|
46
|
+
uses: actions/upload-pages-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
path: dist
|
|
49
|
+
|
|
50
|
+
deploy:
|
|
51
|
+
environment:
|
|
52
|
+
name: github-pages
|
|
53
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
needs: build
|
|
56
|
+
steps:
|
|
57
|
+
- name: Deploy to GitHub Pages
|
|
58
|
+
id: deployment
|
|
59
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Publish npm package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Check out repository
|
|
17
|
+
uses: actions/checkout@v5
|
|
18
|
+
|
|
19
|
+
- name: Set up pnpm
|
|
20
|
+
uses: pnpm/action-setup@v4
|
|
21
|
+
with:
|
|
22
|
+
version: 10.20.0
|
|
23
|
+
|
|
24
|
+
- name: Set up Node.js
|
|
25
|
+
uses: actions/setup-node@v5
|
|
26
|
+
with:
|
|
27
|
+
node-version: 24
|
|
28
|
+
registry-url: https://registry.npmjs.org
|
|
29
|
+
package-manager-cache: false
|
|
30
|
+
|
|
31
|
+
- name: Verify npm version
|
|
32
|
+
run: npm --version
|
|
33
|
+
|
|
34
|
+
- name: Require npm Trusted Publishing support
|
|
35
|
+
run: |
|
|
36
|
+
node -e "const [major, minor, patch] = process.argv[1].split('.').map(Number); if (major < 11 || (major === 11 && (minor < 5 || (minor === 5 && patch < 1)))) process.exit(1)" "$(npm --version)"
|
|
37
|
+
|
|
38
|
+
- name: Verify tag matches package version
|
|
39
|
+
env:
|
|
40
|
+
TAG_VERSION: ${{ github.ref_name }}
|
|
41
|
+
run: |
|
|
42
|
+
test "${TAG_VERSION#v}" = "$(node -p "require('./package.json').version")"
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: pnpm install --frozen-lockfile
|
|
46
|
+
|
|
47
|
+
- name: Run tests
|
|
48
|
+
run: pnpm test
|
|
49
|
+
|
|
50
|
+
- name: Run Astro diagnostics
|
|
51
|
+
run: pnpm check
|
|
52
|
+
|
|
53
|
+
- name: Validate golden consumer
|
|
54
|
+
run: make check-golden
|
|
55
|
+
|
|
56
|
+
- name: Validate external consumer
|
|
57
|
+
run: make check-external
|
|
58
|
+
|
|
59
|
+
- name: Inspect package contents
|
|
60
|
+
run: npm pack --dry-run
|
|
61
|
+
|
|
62
|
+
- name: Check diff hygiene
|
|
63
|
+
run: |
|
|
64
|
+
git diff --check
|
|
65
|
+
git diff --exit-code
|
|
66
|
+
test -z "$(git status --porcelain --untracked-files=all)"
|
|
67
|
+
|
|
68
|
+
- name: Check release artifacts
|
|
69
|
+
run: |
|
|
70
|
+
test -f dist/index.html
|
|
71
|
+
test -f dist/pagefind/pagefind.js
|
|
72
|
+
test -f dist/upcontent-assets/favicon.svg
|
|
73
|
+
|
|
74
|
+
- name: Publish package
|
|
75
|
+
run: npm publish --access public
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: Reusable Upcontent Pages build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
portal-repository:
|
|
7
|
+
description: Repository containing the Upcontent renderer.
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
default: lumamontes/upcontent
|
|
11
|
+
portal-ref:
|
|
12
|
+
description: Tag, branch, or commit of the Upcontent renderer.
|
|
13
|
+
required: false
|
|
14
|
+
type: string
|
|
15
|
+
default: main
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
pages: write
|
|
20
|
+
id-token: write
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Check out consumer repository
|
|
27
|
+
uses: actions/checkout@v5
|
|
28
|
+
|
|
29
|
+
- name: Check out Upcontent renderer
|
|
30
|
+
uses: actions/checkout@v5
|
|
31
|
+
with:
|
|
32
|
+
repository: ${{ inputs.portal-repository }}
|
|
33
|
+
ref: ${{ inputs.portal-ref }}
|
|
34
|
+
path: .upcontent-renderer
|
|
35
|
+
|
|
36
|
+
- name: Set up Pages
|
|
37
|
+
id: pages
|
|
38
|
+
uses: actions/configure-pages@v5
|
|
39
|
+
|
|
40
|
+
- name: Set up pnpm
|
|
41
|
+
uses: pnpm/action-setup@v4
|
|
42
|
+
with:
|
|
43
|
+
version: 10.20.0
|
|
44
|
+
|
|
45
|
+
- name: Set up Node.js
|
|
46
|
+
uses: actions/setup-node@v5
|
|
47
|
+
with:
|
|
48
|
+
node-version: 22
|
|
49
|
+
cache: pnpm
|
|
50
|
+
cache-dependency-path: .upcontent-renderer/pnpm-lock.yaml
|
|
51
|
+
|
|
52
|
+
- name: Install renderer dependencies
|
|
53
|
+
working-directory: .upcontent-renderer
|
|
54
|
+
run: pnpm install --frozen-lockfile
|
|
55
|
+
|
|
56
|
+
- name: Build portal
|
|
57
|
+
working-directory: .upcontent-renderer
|
|
58
|
+
run: make build CONTENT_PATH="${{ github.workspace }}" REPO_URL="https://github.com/${{ github.repository }}" BASE_PATH="${{ steps.pages.outputs.base_path }}" SITE_URL="${{ steps.pages.outputs.origin }}"
|
|
59
|
+
|
|
60
|
+
- name: Upload static artifact
|
|
61
|
+
uses: actions/upload-pages-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
path: .upcontent-renderer/dist
|
|
64
|
+
|
|
65
|
+
deploy:
|
|
66
|
+
environment:
|
|
67
|
+
name: github-pages
|
|
68
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
needs: build
|
|
71
|
+
steps:
|
|
72
|
+
- name: Deploy to GitHub Pages
|
|
73
|
+
id: deployment
|
|
74
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"site": {
|
|
3
|
+
"title": "Upcontent",
|
|
4
|
+
"description": "Create a beautiful, customizable Starlight portal from your documentation repository.",
|
|
5
|
+
"url": "https://lumamontes.github.io/upcontent",
|
|
6
|
+
"logo": {
|
|
7
|
+
"src": ".upcontent/logo.svg",
|
|
8
|
+
"alt": "",
|
|
9
|
+
"replacesTitle": false
|
|
10
|
+
},
|
|
11
|
+
"favicon": ".upcontent/favicon.svg"
|
|
12
|
+
},
|
|
13
|
+
"seo": {
|
|
14
|
+
"enabled": true
|
|
15
|
+
},
|
|
16
|
+
"repo": {
|
|
17
|
+
"url": "https://github.com/lumamontes/upcontent"
|
|
18
|
+
},
|
|
19
|
+
"theme": {
|
|
20
|
+
"customCss": [".upcontent/portal.css"]
|
|
21
|
+
},
|
|
22
|
+
"starlight": {
|
|
23
|
+
"social": [
|
|
24
|
+
{
|
|
25
|
+
"icon": "github",
|
|
26
|
+
"label": "GitHub",
|
|
27
|
+
"href": "https://github.com/lumamontes/upcontent"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"tableOfContents": {
|
|
31
|
+
"minHeadingLevel": 2,
|
|
32
|
+
"maxHeadingLevel": 3
|
|
33
|
+
},
|
|
34
|
+
"lastUpdated": true,
|
|
35
|
+
"pagination": true,
|
|
36
|
+
"expressiveCode": {
|
|
37
|
+
"styleOverrides": {
|
|
38
|
+
"borderRadius": "0.6rem"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"navigation": {
|
|
43
|
+
"roots": [
|
|
44
|
+
"README.md",
|
|
45
|
+
"getting-started",
|
|
46
|
+
"guides",
|
|
47
|
+
"customization",
|
|
48
|
+
"deployment",
|
|
49
|
+
"SHOWCASE.mdx"
|
|
50
|
+
],
|
|
51
|
+
"blocklist": {
|
|
52
|
+
"prefixes": [
|
|
53
|
+
".git/",
|
|
54
|
+
".scratch/",
|
|
55
|
+
".agents/",
|
|
56
|
+
".claude/",
|
|
57
|
+
".cursor/",
|
|
58
|
+
".codex/",
|
|
59
|
+
".opencode/",
|
|
60
|
+
"node_modules/",
|
|
61
|
+
"dist/",
|
|
62
|
+
".astro/",
|
|
63
|
+
"src/",
|
|
64
|
+
"server/",
|
|
65
|
+
"docs/agents/",
|
|
66
|
+
"docs/",
|
|
67
|
+
"test-fixtures/",
|
|
68
|
+
"external-consumer/",
|
|
69
|
+
"workflows/"
|
|
70
|
+
],
|
|
71
|
+
"exact": [
|
|
72
|
+
"AGENTS.md",
|
|
73
|
+
"CLAUDE.md",
|
|
74
|
+
"CONTEXT.md",
|
|
75
|
+
"PRODUCT.md"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"labelOverrides": {
|
|
79
|
+
"docs": "Project Docs"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"content": {
|
|
83
|
+
"titleField": "heading"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Upcontent</title>
|
|
3
|
+
<desc id="desc">Upcontent mark.</desc>
|
|
4
|
+
<rect width="56" height="56" x="8" y="8" rx="16" fill="#0f766e"/>
|
|
5
|
+
<path d="M20 24h32v8H20zm0 16h24v8H20z" fill="#fff"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@import '@fontsource/poppins/400.css';
|
|
2
|
+
@import '@fontsource/poppins/500.css';
|
|
3
|
+
@import '@fontsource/poppins/600.css';
|
|
4
|
+
@import '@fontsource/poppins/700.css';
|
|
5
|
+
|
|
6
|
+
/* The consumer owns this identity and can replace it without changing the renderer. */
|
|
7
|
+
:root {
|
|
8
|
+
--sl-color-accent: #0f766e;
|
|
9
|
+
--sl-color-accent-high: #115e59;
|
|
10
|
+
--sl-color-accent-low: #ccfbf1;
|
|
11
|
+
--sl-color-text-accent: #0f766e;
|
|
12
|
+
--sl-color-bg: #f8faf7;
|
|
13
|
+
--sl-color-bg-nav: #f8faf7;
|
|
14
|
+
--sl-color-bg-sidebar: #eef4f1;
|
|
15
|
+
--sl-color-bg-inline-code: #e3eeea;
|
|
16
|
+
--sl-color-hairline-light: #d8e5df;
|
|
17
|
+
--sl-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
18
|
+
--sl-font-mono: 'SFMono-Regular', Consolas, monospace;
|
|
19
|
+
--sl-text-5xl: 3.35rem;
|
|
20
|
+
--sl-content-width: 48rem;
|
|
21
|
+
--sl-line-height: 1.72;
|
|
22
|
+
--up-sidebar-active: rgba(15, 118, 110, 0.08);
|
|
23
|
+
--up-sidebar-hover: rgba(15, 118, 110, 0.07);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:root[data-theme='light'] {
|
|
27
|
+
--sl-color-accent: #0f766e;
|
|
28
|
+
--sl-color-accent-high: #115e59;
|
|
29
|
+
--sl-color-accent-low: #ccfbf1;
|
|
30
|
+
--sl-color-text-accent: #0f766e;
|
|
31
|
+
--sl-color-bg: #f8faf7;
|
|
32
|
+
--sl-color-bg-nav: #f8faf7;
|
|
33
|
+
--sl-color-bg-sidebar: #eef4f1;
|
|
34
|
+
--sl-color-bg-inline-code: #e3eeea;
|
|
35
|
+
--sl-color-hairline-light: #d8e5df;
|
|
36
|
+
--up-sidebar-active: rgba(15, 118, 110, 0.08);
|
|
37
|
+
--up-sidebar-hover: rgba(15, 118, 110, 0.07);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:root[data-theme='dark'] {
|
|
41
|
+
--sl-color-accent: #5eead4;
|
|
42
|
+
--sl-color-accent-high: #99f6e4;
|
|
43
|
+
--sl-color-accent-low: #134e4a;
|
|
44
|
+
--sl-color-text-accent: #99f6e4;
|
|
45
|
+
--sl-color-bg: #0d191a;
|
|
46
|
+
--sl-color-bg-nav: #102324;
|
|
47
|
+
--sl-color-bg-sidebar: #0f2021;
|
|
48
|
+
--sl-color-bg-inline-code: #173334;
|
|
49
|
+
--sl-color-hairline-light: #274445;
|
|
50
|
+
--up-sidebar-active: rgba(94, 234, 212, 0.09);
|
|
51
|
+
--up-sidebar-hover: rgba(94, 234, 212, 0.08);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.site-title {
|
|
55
|
+
font-size: 1.15rem;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
letter-spacing: -0.025em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sl-container > h1,
|
|
61
|
+
.sl-markdown-content h1 {
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
letter-spacing: -0.035em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sl-markdown-content h2 {
|
|
67
|
+
margin-top: 2.6em;
|
|
68
|
+
padding-top: 0.7em;
|
|
69
|
+
border-top: 1px solid var(--sl-color-hairline-light);
|
|
70
|
+
letter-spacing: -0.035em;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.sl-markdown-content :not(pre) > code {
|
|
74
|
+
border: 1px solid var(--sl-color-hairline-light);
|
|
75
|
+
border-radius: 0.25rem;
|
|
76
|
+
padding: 0.12em 0.35em;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.sl-markdown-content blockquote {
|
|
80
|
+
border-inline-start-color: var(--sl-color-accent);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.header {
|
|
84
|
+
border-bottom: 1px solid var(--sl-color-hairline-light);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.sl-markdown-content a:not(.sl-link-button) {
|
|
88
|
+
text-decoration-thickness: 0.08em;
|
|
89
|
+
text-underline-offset: 0.18em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sidebar-content .top-level > li + li {
|
|
93
|
+
margin-top: 0.3rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sidebar-content .top-level > li > details > summary {
|
|
97
|
+
color: var(--sl-color-text);
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
letter-spacing: 0.005em;
|
|
100
|
+
padding-block: 0.35rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.sidebar-content .top-level > li > details > summary .caret {
|
|
104
|
+
color: var(--sl-color-gray-3);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.sidebar-content ul ul {
|
|
108
|
+
margin-top: 0.2rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.sidebar-content ul ul li {
|
|
112
|
+
border-inline-start-color: var(--sl-color-hairline-light);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.sidebar-content a {
|
|
116
|
+
border-radius: 0.45rem;
|
|
117
|
+
padding-block: 0.42rem;
|
|
118
|
+
transition: background-color 140ms ease, color 140ms ease;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.sidebar-content a:hover,
|
|
122
|
+
.sidebar-content a:focus-visible {
|
|
123
|
+
background: var(--up-sidebar-hover);
|
|
124
|
+
color: var(--sl-color-text);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.sidebar-content a[aria-current='page'],
|
|
128
|
+
.sidebar-content a[aria-current='page']:hover,
|
|
129
|
+
.sidebar-content a[aria-current='page']:focus-visible {
|
|
130
|
+
background: var(--up-sidebar-active);
|
|
131
|
+
color: var(--sl-color-text-accent);
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media (min-width: 50em) {
|
|
136
|
+
.sl-markdown-content h1 {
|
|
137
|
+
max-width: 15ch;
|
|
138
|
+
}
|
|
139
|
+
}
|
package/CONTEXT.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Upcontent Context
|
|
2
|
+
|
|
3
|
+
Upcontent renders documentation repositories into static portals. This context defines the publication and discoverability terms used by the renderer and its consumer repositories.
|
|
4
|
+
|
|
5
|
+
## Publication And Discoverability
|
|
6
|
+
|
|
7
|
+
**Private source**:
|
|
8
|
+
The Git repository containing the documentation is access-controlled. This says nothing about the visibility of the generated portal.
|
|
9
|
+
_Avoid_: private portal
|
|
10
|
+
|
|
11
|
+
**Public portal**:
|
|
12
|
+
A generated portal that is publicly accessible and has explicitly enabled SEO discoverability.
|
|
13
|
+
_Avoid_: public repository
|
|
14
|
+
|
|
15
|
+
**Unlisted portal**:
|
|
16
|
+
A publicly accessible portal that asks crawlers not to index its pages. It is not access control and must not be described as private.
|
|
17
|
+
_Avoid_: private portal
|
|
18
|
+
|
|
19
|
+
**Private portal**:
|
|
20
|
+
A generated portal protected by the hosting layer so unauthenticated visitors and crawlers cannot access its content.
|
|
21
|
+
_Avoid_: hidden portal, noindex portal
|
|
22
|
+
|
|
23
|
+
**SEO policy**:
|
|
24
|
+
The explicit site-level choice to enable or disable search-engine discoverability for a portal. SEO is opt-in; page-level `noindex` can narrow an enabled policy to individual pages.
|
|
25
|
+
_Avoid_: SEO config, SEO mode
|
package/Makefile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
CONTENT_PATH ?= $(HOME)/www/my-content-repo
|
|
2
|
+
REPO_URL ?=
|
|
3
|
+
BASE_PATH ?=
|
|
4
|
+
SITE_URL ?=
|
|
5
|
+
|
|
6
|
+
.PHONY: dev build preview check-golden check-external
|
|
7
|
+
|
|
8
|
+
define prepare-content
|
|
9
|
+
@test -d "$(CONTENT_PATH)" || (printf 'Content path does not exist: %s\n' "$(CONTENT_PATH)" >&2; exit 1)
|
|
10
|
+
@rm -f src/content/docs
|
|
11
|
+
@ln -s "$(abspath $(CONTENT_PATH))" src/content/docs
|
|
12
|
+
endef
|
|
13
|
+
|
|
14
|
+
dev:
|
|
15
|
+
$(prepare-content)
|
|
16
|
+
REPO_URL=$(REPO_URL) BASE_PATH=$(BASE_PATH) SITE_URL=$(SITE_URL) pnpm exec astro dev
|
|
17
|
+
|
|
18
|
+
build:
|
|
19
|
+
$(prepare-content)
|
|
20
|
+
REPO_URL=$(REPO_URL) BASE_PATH=$(BASE_PATH) SITE_URL=$(SITE_URL) pnpm exec astro build
|
|
21
|
+
|
|
22
|
+
preview:
|
|
23
|
+
$(MAKE) build CONTENT_PATH="$(CONTENT_PATH)" REPO_URL="$(REPO_URL)" BASE_PATH="$(BASE_PATH)" SITE_URL="$(SITE_URL)"
|
|
24
|
+
pnpm exec astro preview
|
|
25
|
+
|
|
26
|
+
check-golden:
|
|
27
|
+
$(MAKE) build CONTENT_PATH="$(CURDIR)"
|
|
28
|
+
node scripts/verify-golden-build.mjs
|
|
29
|
+
|
|
30
|
+
check-external:
|
|
31
|
+
$(MAKE) build CONTENT_PATH="$(CURDIR)/test-fixtures/external-consumer" REPO_URL="https://github.com/example/external-consumer"
|
|
32
|
+
@test -f dist/index.html
|
|
33
|
+
node scripts/verify-external-build.mjs
|