| 1 |
// @ts-check |
| 2 |
import { defineConfig } from 'astro/config'; |
| 3 |
import starlight from '@astrojs/starlight'; |
| 4 |
import remarkDirective from 'remark-directive'; |
| 5 |
import remarkGfm from 'remark-gfm'; |
| 6 |
import remarkIncludeMarkdown from './plugins/remark-include-markdown.mjs'; |
| 7 |
import remarkYamlTable from './plugins/remark-yaml-table.mjs'; |
| 8 |
import starlightStripMdExtension from './plugins/starlight-strip-md-extension.mjs'; |
| 9 |
import { fileURLToPath } from 'node:url'; |
| 10 |
|
| 11 |
const docsDir = fileURLToPath(new URL('src/content/docs', import.meta.url)); |
| 12 |
|
| 13 |
// https://astro.build/config |
| 14 |
export default defineConfig({ |
| 15 |
site: 'https://docs.jj-vcs.dev', |
| 16 |
markdown: { |
| 17 |
remarkPlugins: [ |
| 18 |
remarkGfm, |
| 19 |
remarkDirective, |
| 20 |
[remarkIncludeMarkdown, { basePath: docsDir }], |
| 21 |
[remarkYamlTable, { basePath: docsDir }], |
| 22 |
], |
| 23 |
}, |
| 24 |
integrations: [ |
| 25 |
starlight({ |
| 26 |
plugins: [starlightStripMdExtension()], |
| 27 |
title: 'Jujutsu docs', |
| 28 |
favicon: "/images/jj-logo.svg", |
| 29 |
customCss: ['./src/styles/custom.css'], |
| 30 |
logo: { |
| 31 |
src: "./public/images/jj-logo.svg", |
| 32 |
}, |
| 33 |
components: { |
| 34 |
ThemeSelect: './src/components/ThemeVersionSelect.astro', |
| 35 |
}, |
| 36 |
markdown: { |
| 37 |
processedDirs: ['../../docs'], |
| 38 |
}, |
| 39 |
social: [ |
| 40 |
{ |
| 41 |
icon: 'github', |
| 42 |
label: 'GitHub', |
| 43 |
href: 'https://github.com/jj-vcs/jj' |
| 44 |
}, |
| 45 |
{ |
| 46 |
icon: "discord", |
| 47 |
label: "Discord", |
| 48 |
href: "https://discord.gg/dkmfj3aGQN", |
| 49 |
}, |
| 50 |
], |
| 51 |
sidebar: [ |
| 52 |
{ label: 'Home', slug: 'index' }, |
| 53 |
{ |
| 54 |
label: 'Getting started', |
| 55 |
items: [ |
| 56 |
{ label: 'Installation and setup', slug: 'install-and-setup' }, |
| 57 |
{ label: "Tutorial and bird's eye view", slug: 'tutorial' }, |
| 58 |
{ label: 'Working with Gerrit', slug: 'gerrit' }, |
| 59 |
{ label: 'Working with GitHub', slug: 'github' }, |
| 60 |
{ label: 'Working on Windows', slug: 'windows' }, |
| 61 |
], |
| 62 |
collapsed: true, |
| 63 |
}, |
| 64 |
{ label: 'FAQ', slug: 'faq' }, |
| 65 |
{ label: 'CLI reference', slug: 'cli-reference' }, |
| 66 |
{ label: 'Testimonials', slug: 'testimonials' }, |
| 67 |
{ label: 'Community-built tools', slug: 'community_tools' }, |
| 68 |
{ |
| 69 |
label: 'Concepts', |
| 70 |
items: [ |
| 71 |
{ label: 'Working copy', slug: 'working-copy' }, |
| 72 |
{ label: 'Bookmarks', slug: 'bookmarks' }, |
| 73 |
{ label: 'Conflicts', slug: 'conflicts' }, |
| 74 |
{ label: 'Operation log', slug: 'operation-log' }, |
| 75 |
{ label: 'Glossary', slug: 'glossary' }, |
| 76 |
], |
| 77 |
collapsed: true, |
| 78 |
}, |
| 79 |
{ |
| 80 |
label: 'Guides', |
| 81 |
items: [ |
| 82 |
{ label: 'Divergent changes', slug: 'guides/divergence' }, |
| 83 |
{ label: 'Multiple remotes', slug: 'guides/multiple-remotes' }, |
| 84 |
], |
| 85 |
collapsed: true, |
| 86 |
}, |
| 87 |
{ |
| 88 |
label: 'Reference', |
| 89 |
items: [ |
| 90 |
{ label: 'Configuration', slug: 'config' }, |
| 91 |
{ label: 'Fileset language', slug: 'filesets' }, |
| 92 |
{ label: 'Revset language', slug: 'revsets' }, |
| 93 |
{ label: 'Templating language', slug: 'templates' }, |
| 94 |
], |
| 95 |
collapsed: true, |
| 96 |
}, |
| 97 |
{ |
| 98 |
label: 'Comparisons', |
| 99 |
items: [ |
| 100 |
{ label: 'Git comparison', slug: 'git-comparison' }, |
| 101 |
{ label: 'Git command table', slug: 'git-command-table' }, |
| 102 |
{ label: 'Git compatibility', slug: 'git-compatibility' }, |
| 103 |
{ label: 'Jujutsu for Git experts', slug: 'git-experts' }, |
| 104 |
{ label: 'Sapling comparison', slug: 'sapling-comparison' }, |
| 105 |
{ label: 'Other related work', slug: 'related-work' }, |
| 106 |
], |
| 107 |
collapsed: true, |
| 108 |
}, |
| 109 |
{ |
| 110 |
label: 'Technical details', |
| 111 |
items: [ |
| 112 |
{ label: 'Core tenets', slug: 'core_tenets' }, |
| 113 |
{ label: 'Architecture', slug: 'technical/architecture' }, |
| 114 |
{ label: 'Concurrency', slug: 'technical/concurrency' }, |
| 115 |
{ label: 'Conflicts', slug: 'technical/conflicts' }, |
| 116 |
], |
| 117 |
collapsed: true, |
| 118 |
}, |
| 119 |
{ |
| 120 |
label: 'Contributing', |
| 121 |
items: [ |
| 122 |
{ label: 'Guidelines and "How to...?"', slug: 'contributing' }, |
| 123 |
{ label: 'Code of conduct', slug: 'code-of-conduct' }, |
| 124 |
{ label: 'Style guide', slug: 'style_guide' }, |
| 125 |
{ label: 'Design docs', slug: 'design_docs' }, |
| 126 |
{ label: 'Design doc blueprint', slug: 'design_doc_blueprint' }, |
| 127 |
{ label: 'Releasing', slug: 'releasing' }, |
| 128 |
{ label: 'Temporary voting for governance', slug: 'governance/temporary-voting' }, |
| 129 |
{ label: 'Governance', slug: 'governance/governance' }, |
| 130 |
], |
| 131 |
collapsed: true, |
| 132 |
}, |
| 133 |
{ |
| 134 |
label: 'Design docs', |
| 135 |
items: [ |
| 136 |
{ label: 'git-submodules', slug: 'design/git-submodules' }, |
| 137 |
{ label: 'git-submodule-storage', slug: 'design/git-submodule-storage' }, |
| 138 |
{ label: 'JJ run', slug: 'design/run' }, |
| 139 |
{ label: 'Sparse patterns v2', slug: 'design/sparse-v2' }, |
| 140 |
{ label: 'Tracking branches', slug: 'design/tracking-branches' }, |
| 141 |
{ label: 'Copy tracking and tracing', slug: 'design/copy-tracking' }, |
| 142 |
{ label: 'Secure config', slug: 'design/secure-config' }, |
| 143 |
], |
| 144 |
collapsed: true, |
| 145 |
}, |
| 146 |
{ label: 'Development roadmap', slug: 'roadmap' }, |
| 147 |
{ label: 'Changelog', slug: 'changelog' }, |
| 148 |
], |
| 149 |
}), |
| 150 |
], |
| 151 |
}); |