Skip to content

Commit 538ffde

Browse files
julien-deramondHiDeoomdo
committed
docs: migration to Astro
Co-authored-by: HiDeoo <[email protected]> Co-authored-by: Mark Otto <[email protected]>
1 parent 99a0dc6 commit 538ffde

File tree

558 files changed

+27910
-20000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+27910
-20000
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
**/dist/
33
**/vendor/
44
/_site/
5+
/site/public/
56
/js/coverage/
67
/site/static/sw.js
8+
/site/static/docs/**/assets/sw.js
79
/site/layouts/partials/

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@
202202
},
203203
{
204204
"files": [
205-
"site/assets/js/**"
205+
"site/src/assets/application.js",
206+
"site/src/assets/partials/*.js",
207+
"site/src/assets/search.js",
208+
"site/src/assets/snippets.js",
209+
"site/src/assets/stackblitz.js",
210+
"site/src/plugins/*.js"
206211
],
207212
"parserOptions": {
208213
"sourceType": "module",

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Ignore docs files
22
/_site/
3-
# Hugo files
4-
/resources/
5-
/.hugo_build.lock
63

74
# Numerous always-ignore extensions
85
*.diff
@@ -41,3 +38,9 @@ Thumbs.db
4138
/dist-sass/
4239
/js/coverage/
4340
/node_modules/
41+
42+
# Site
43+
/site/dist
44+
/site/node_modules
45+
/site/.astro
46+
/site/public

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Prettier is only used for the website
2+
3+
site/.astro
4+
site/dist
5+
site/public
6+
site/src/assets
7+
site/src/scss
8+
site/src/pages/**/*.md
9+
site/src/pages/**/*.mdx
10+
site/src/content/**/*.mdx
11+
site/src/layouts/RedirectLayout.astro
12+
site/static

.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
**/dist/
33
**/vendor/
44
/_site/
5+
/site/public/
56
/js/coverage/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,18 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
142142

143143
## Documentation
144144

145-
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
145+
Bootstrap's documentation, included in this repo in the root directory, is built with [Astro](https://astro.build/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
146146

147147
Documentation search is powered by [Algolia's DocSearch](https://docsearch.algolia.com/).
148148

149149
### Running documentation locally
150150

151-
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
151+
1. Run `npm install` to install the Node.js dependencies, including Astro (the site builder).
152152
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
153153
3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
154154
4. Open `http://localhost:9001/` in your browser, and voilà.
155155

156-
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
156+
Learn more about using Astro by reading its [documentation](https://docs.astro.build/en/getting-started/).
157157

158158
### Documentation for previous releases
159159

build/change-version.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-r
1616
// These are the files we only care about replacing the version
1717
const FILES = [
1818
'README.md',
19-
'hugo.yml',
19+
'config.yml',
2020
'js/src/base-component.js',
2121
'package.js',
2222
'scss/mixins/_banner.scss',

build/generate-sri.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
1919

2020
sh.config.fatal = true
2121

22-
const configFile = path.join(__dirname, '../hugo.yml')
22+
const configFile = path.join(__dirname, '../config.yml')
2323

2424
// Array of objects which holds the files to generate SRI hashes for.
2525
// `file` is the path from the root folder
26-
// `configPropertyName` is the hugo.yml variable's name of the file
26+
// `configPropertyName` is the config.yml variable's name of the file
2727
const files = [
2828
{
2929
file: 'dist/css/bootstrap.min.css',

build/vnu-jar.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
3030
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
3131
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
3232
// and offer more robust alternatives, but also need to show a less-than-ideal example
33-
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.'
33+
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.',
34+
// A `code` element with the `is:raw` attribute coming from remark-prismjs (Astro upstream possible bug)
35+
'Attribute “is:raw” is not serializable as XML 1.0.',
36+
'Attribute “is:raw” not allowed on element “code” at this point.',
37+
// Astro's expecting trailing slashes on HTML tags such as <br />
38+
'Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.'
3439
].join('|')
3540

3641
const args = [

config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
title: "Bootstrap"
2+
baseURL: "https://getbootstrap.com"
3+
4+
docsDir: "site"
5+
6+
subtitle: "The most popular HTML, CSS, and JS library in the world."
7+
description: "Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins."
8+
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
9+
10+
current_version: "5.3.5"
11+
current_ruby_version: "5.3.5"
12+
docs_version: "5.3"
13+
rfs_version: "v10.0.0"
14+
github_org: "https://github.com/twbs"
15+
repo: "https://github.com/twbs/bootstrap"
16+
x: "getbootstrap"
17+
opencollective: "https://opencollective.com/bootstrap"
18+
blog: "https://blog.getbootstrap.com/"
19+
themes: "https://themes.getbootstrap.com/"
20+
icons: "https://icons.getbootstrap.com/"
21+
swag: "https://cottonbureau.com/people/bootstrap"
22+
23+
analytics:
24+
fathom_site: "ITUSEYJG"
25+
26+
algolia:
27+
app_id: "AK7KMZKZHQ"
28+
api_key: "3151f502c7b9e9dafd5e6372b691a24e"
29+
index_name: "bootstrap"
30+
31+
download:
32+
source: "https://github.com/twbs/bootstrap/archive/v5.3.5.zip"
33+
dist: "https://github.com/twbs/bootstrap/releases/download/v5.3.5/bootstrap-5.3.5-dist.zip"
34+
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.3.5/bootstrap-5.3.5-examples.zip"
35+
36+
cdn:
37+
# See https://www.srihash.org for info on how to generate the hashes
38+
css: "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
39+
css_hash: "sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7"
40+
css_rtl: "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css"
41+
css_rtl_hash: "sha384-q8+l9TmX3RaSz3HKGBmqP2u5MkgeN7HrfOJBLcTgZsQsbrx8WqqxdA5PuwUV9WIx"
42+
js: "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
43+
js_hash: "sha384-VQqxDN0EQCkWoxt/0vsQvZswzTHUVOImccYmSyhJTp7kGtPed0Qcx8rK9h9YEgx+"
44+
js_bundle: "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
45+
js_bundle_hash: "sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq"
46+
popper: "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
47+
popper_hash: "sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
48+
popper_esm: "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/esm/popper.min.js"
49+
50+
anchors:
51+
min: 2
52+
max: 5
53+
54+
toc:
55+
min: 2
56+
max: 6

0 commit comments

Comments
 (0)