Skip to content

Commit a8ab199

Browse files
julien-deramondHiDeoomdo
authored
Docs: migration from Hugo to Astro (#41251)
Co-authored-by: HiDeoo <[email protected]> Co-authored-by: Mark Otto <[email protected]>
1 parent 99a0dc6 commit a8ab199

File tree

580 files changed

+30127
-22273
lines changed

Some content is hidden

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

580 files changed

+30127
-22273
lines changed

Diff for: .eslintignore

+2
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/

Diff for: .eslintrc.json

+6-1
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",

Diff for: .github/CONTRIBUTING.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Bootstrap
22

3-
Looking to contribute something to Bootstrap? **Here's how you can help.**
3+
Looking to contribute something to Bootstrap? **Heres how you can help.**
44

55
Please take a moment to review this document in order to make the contribution
66
process easy and effective for everyone involved.
@@ -33,14 +33,14 @@ restrictions:
3333

3434
## Issues assignment
3535

36-
The core team will be looking at the open issues, analyze them, and provide guidance on how to proceed. **Issues won't be assigned to anyone outside the core team.** However, contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to. Please wait that the issue is ready to be worked on before submitting a PR, we don't want to waste your time.
36+
The core team will be looking at the open issues, analyze them, and provide guidance on how to proceed. **Issues wont be assigned to anyone outside the core team.** However, contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to. Please wait that the issue is ready to be worked on before submitting a PR, we dont want to waste your time.
3737

38-
Please keep in mind that the core team is small, has limited resources and that we are not always able to respond immediately. We will try to provide feedback as soon as possible, but please be patient. If you don't get a response immediately, it doesn't mean that we are ignoring you or that we don't care about your issue or PR. We will get back to you as soon as we can.
38+
Please keep in mind that the core team is small, has limited resources and that we are not always able to respond immediately. We will try to provide feedback as soon as possible, but please be patient. If you dont get a response immediately, it doesnt mean that we are ignoring you or that we dont care about your issue or PR. We will get back to you as soon as we can.
3939

4040

4141
## Issues and labels
4242

43-
Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them:
43+
Our bug tracker utilizes several labels to help organize and identify issues. Heres what they represent and how we use them:
4444

4545
- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker.
4646
- `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in Bootstrap.
@@ -64,7 +64,7 @@ Good bug reports are extremely helpful, so thanks!
6464
Guidelines for bug reports:
6565

6666
0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your
67-
problem isn't caused by a simple error in your own code.
67+
problem isnt caused by a simple error in your own code.
6868

6969
1. **Use the GitHub issue search** &mdash; check if the issue has already been
7070
reported.
@@ -77,7 +77,7 @@ Guidelines for bug reports:
7777
These [v4 CodePen](https://codepen.io/team/bootstrap/pen/yLabNQL) and [v5 CodePen](https://codepen.io/team/bootstrap/pen/qBamdLj) are helpful templates.
7878

7979

80-
A good bug report shouldn't leave others needing to chase you up for more
80+
A good bug report shouldnt leave others needing to chase you up for more
8181
information. Please try to be as detailed as possible in your report. What is
8282
your environment? What steps will reproduce the issue? What browser(s) and OS
8383
experience the problem? Do other browsers show the bug differently? What
@@ -109,16 +109,16 @@ Sometimes bugs reported to us are actually caused by bugs in the browser(s) them
109109
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
110110
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
111111
| Mozilla | Firefox | Gecko | <https://bugzilla.mozilla.org/enter_bug.cgi> | "Core" is normally the right product option to choose. |
112-
| Apple | Safari | WebKit | <https://bugs.webkit.org/enter_bug.cgi?product=WebKit> | In Apple's bug reporter, choose "Safari" as the product. |
112+
| Apple | Safari | WebKit | <https://bugs.webkit.org/enter_bug.cgi?product=WebKit> | In Apples bug reporter, choose "Safari" as the product. |
113113
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | <https://bugs.chromium.org/p/chromium/issues/list> | Click the "New issue" button. |
114114
| Microsoft | Edge | Blink | <https://developer.microsoft.com/en-us/microsoft-edge/> | Go to "Help > Send Feedback" from the browser |
115115

116116

117117
## Feature requests
118118

119119
Feature requests are welcome. But take a moment to find out whether your idea
120-
fits with the scope and aims of the project. It's up to _you_ to make a strong
121-
case to convince the project's developers of the merits of this feature. Please
120+
fits with the scope and aims of the project. Its up to _you_ to make a strong
121+
case to convince the projects developers of the merits of this feature. Please
122122
provide as much detail and context as possible.
123123

124124

@@ -131,8 +131,8 @@ commits.
131131
**Please ask first** before embarking on any **significant** pull request (e.g.
132132
implementing features, refactoring code, porting to a different language),
133133
otherwise you risk spending a lot of time working on something that the
134-
project's developers might not want to merge into the project. For trivial
135-
things, or things that don't require a lot of your time, you can go ahead and
134+
projects developers might not want to merge into the project. For trivial
135+
things, or things that dont require a lot of your time, you can go ahead and
136136
make a PR.
137137

138138
Please adhere to the [coding guidelines](#code-guidelines) used throughout the
@@ -144,7 +144,7 @@ any dist files (`dist/` or `js/dist`).** Those files are automatically generated
144144
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss)
145145
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/main/js/src) instead.
146146

147-
Similarly, when contributing to Bootstrap's documentation, you should edit the
147+
Similarly, when contributing to Bootstraps documentation, you should edit the
148148
documentation source files in
149149
[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs).
150150
**Do not edit the `gh-pages` branch.** That branch is generated from the
@@ -187,7 +187,7 @@ included in the project:
187187

188188
5. Commit your changes in logical chunks. Please adhere to these [git commit
189189
message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
190-
or your code is unlikely be merged into the main project. Use Git's
190+
or your code is unlikely be merged into the main project. Use Gits
191191
[interactive rebase](https://help.github.com/articles/about-git-rebase/)
192192
feature to tidy up your commits before making them public.
193193

@@ -228,15 +228,15 @@ includes code changes) and under the terms of the
228228
[Adhere to the Code Guide.](https://codeguide.co/#html)
229229

230230
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
231-
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
231+
- Use CDNs and HTTPS for third-party JS when possible. We dont use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
232232
- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
233233

234234
### CSS
235235

236236
[Adhere to the Code Guide.](https://codeguide.co/#css)
237237

238238
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG/#distinguishable).
239-
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://www.a11yproject.com/posts/2013-01-25-never-remove-css-outlines/) for more details.
239+
- Except in rare cases, dont remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://www.a11yproject.com/posts/2013-01-25-never-remove-css-outlines/) for more details.
240240

241241
### JS
242242

@@ -255,4 +255,4 @@ Run `npm run test` before committing to ensure your changes follow our coding st
255255
By contributing your code, you agree to license your contribution under the [MIT License](../LICENSE).
256256
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/).
257257

258-
Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0.
258+
Prior to v3.1.0, Bootstraps code was released under the Apache License v2.0.

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
### Checklist
1919

2020
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
21-
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
21+
<!-- If youre unsure about any of these, dont hesitate to ask. Were here to help! -->
2222

2323
- [ ] I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
2424
- [ ] My code follows the code style of the project _(using `npm run lint`)_

Diff for: .gitignore

+6-3
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

Diff for: .prettierignore

+12
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

Diff for: .stylelintignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
**/dist/
33
**/vendor/
44
/_site/
5+
/site/public/
56
/js/coverage/

Diff for: CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Examples of unacceptable behavior include:
3131
any kind
3232
- Trolling, insulting or derogatory comments, and personal or political attacks
3333
- Public or private harassment
34-
- Publishing others' private information, such as a physical or email address,
34+
- Publishing others private information, such as a physical or email address,
3535
without their explicit permission
3636
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting

Diff for: README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
3131

3232
- [Quick start](#quick-start)
3333
- [Status](#status)
34-
- [What's included](#whats-included)
34+
- [Whats included](#whats-included)
3535
- [Bugs and feature requests](#bugs-and-feature-requests)
3636
- [Documentation](#documentation)
3737
- [Contributing](#contributing)
@@ -74,9 +74,9 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.3/getting-starte
7474
[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap?logo=opencollective&logoColor=fff)](#sponsors)
7575

7676

77-
## What's included
77+
## Whats included
7878

79-
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
79+
Within the download youll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
8080

8181
<details>
8282
<summary>Download contents</summary>
@@ -132,7 +132,7 @@ Within the download you'll find the following directories and files, logically g
132132
```
133133
</details>
134134

135-
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://web.dev/articles/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/docs/v2/).
135+
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://web.dev/articles/source-maps) (`bootstrap.*.map`) are available for use with certain browsers developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/docs/v2/).
136136

137137

138138
## Bugs and feature requests
@@ -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+
Bootstraps 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

@@ -173,7 +173,7 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
173173

174174
## Community
175175

176-
Get updates on Bootstrap's development and chat with the project maintainers and community members.
176+
Get updates on Bootstraps development and chat with the project maintainers and community members.
177177

178178
- Follow [@getbootstrap on X](https://x.com/getbootstrap).
179179
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).

Diff for: build/change-version.mjs

+1-1
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',

Diff for: build/generate-sri.mjs

+2-2
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',

Diff for: build/vnu-jar.mjs

+6-1
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 = [

Diff for: config.yml

+56
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)