-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathastro.config.mjs
More file actions
114 lines (113 loc) · 4.38 KB
/
astro.config.mjs
File metadata and controls
114 lines (113 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import rehypeExternalLinks from 'rehype-external-links';
import rehypeRewriteLinks from './plugins/rehype-rewrite-links.mjs';
// https://astro.build/config
export default defineConfig({
site: process.env.PUBLIC_SITE,
// For versioned deployments: /0.1/, /0.2/, etc.
// PUBLIC_BASE_PATH is set per-version in CI (e.g., /0.2/, /main/)
base: process.env.PUBLIC_BASE_PATH || '/',
markdown: {
rehypePlugins: [
// Rewrite relative .md links for Astro's directory-based output
rehypeRewriteLinks,
// Open external links in new tab
[rehypeExternalLinks, { target: '_blank', rel: ['noopener', 'noreferrer'] }],
],
},
integrations: [
starlight({
title: 'ICP CLI',
description: 'Command-line tool for developing and deploying applications on the Internet Computer Protocol (ICP)',
favicon: '/favicon.png',
components: {
SiteTitle: './src/components/SiteTitle.astro',
Banner: './src/components/Banner.astro',
},
head: [
{
tag: 'script',
attrs: {},
content: `
// Open social links in new tab
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.social-icons a[href^="http"]').forEach(link => {
link.setAttribute('target', '_blank');
link.setAttribute('rel', 'noopener noreferrer');
});
});
`,
},
],
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/dfinity/icp-cli' },
],
logo: {
src: './src/assets/icp-logo.svg',
replacesTitle: false,
alt: 'ICP',
},
customCss: [
'./src/styles/layers.css',
'./src/styles/theme.css',
'./src/styles/overrides.css',
'./src/styles/elements.css',
],
sidebar: [
{
label: 'Start Here',
items: [
{ label: 'Quickstart', slug: 'quickstart' },
{ label: 'Tutorial', slug: 'tutorial' },
],
},
{
label: 'Guides',
items: [
{ label: 'Installation', slug: 'guides/installation' },
{ label: 'Local Development', slug: 'guides/local-development' },
{ label: 'Deploying to Mainnet', slug: 'guides/deploying-to-mainnet' },
{ label: 'Deploying to Specific Subnets', slug: 'guides/deploying-to-specific-subnets' },
{ label: 'Canister Snapshots', slug: 'guides/canister-snapshots' },
{ label: 'Canister Migration', slug: 'guides/canister-migration' },
{ label: 'Managing Environments', slug: 'guides/managing-environments' },
{ label: 'Managing Identities', slug: 'guides/managing-identities' },
{ label: 'Tokens and Cycles', slug: 'guides/tokens-and-cycles' },
{ label: 'Containerized Networks', slug: 'guides/containerized-networks' },
{ label: 'Using Recipes', slug: 'guides/using-recipes' },
{ label: 'Creating Recipes', slug: 'guides/creating-recipes' },
{ label: 'Creating Templates', slug: 'guides/creating-templates' },
],
},
{
label: 'Concepts',
items: [
{ label: 'Project Model', slug: 'concepts/project-model' },
{ label: 'Build, Deploy, Sync', slug: 'concepts/build-deploy-sync' },
{ label: 'Environments and Networks', slug: 'concepts/environments' },
{ label: 'Canister Discovery', slug: 'concepts/canister-discovery' },
{ label: 'Binding Generation', slug: 'concepts/binding-generation' },
{ label: 'Recipes', slug: 'concepts/recipes' },
],
},
{
label: 'Reference',
items: [
{ label: 'CLI Reference', slug: 'reference/cli' },
{ label: 'Configuration Reference', slug: 'reference/configuration' },
{ label: 'Canister Settings', slug: 'reference/canister-settings' },
{ label: 'Environment Variables', slug: 'reference/environment-variables' },
],
},
{
label: 'Other',
items: [
{ label: 'Migrating from dfx', slug: 'migration/from-dfx' },
{ label: 'Telemetry', slug: 'telemetry' },
],
},
],
}),
],
});