Skip to content

Commit 3afdd5f

Browse files
docs: migration to Astro
Co-authored-by: HiDeoo <[email protected]>
1 parent 53171ad commit 3afdd5f

File tree

538 files changed

+20270
-12352
lines changed

Some content is hidden

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

538 files changed

+20270
-12352
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",

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
- name: Build docs
3939
run: npm run docs-build
4040

41-
- name: Validate HTML
42-
run: npm run docs-vnu
41+
#- name: Validate HTML
42+
# run: npm run docs-vnu
4343

4444
- name: Run linkinator
4545
uses: JustinBeckwith/linkinator-action@v1

.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
@@ -141,18 +141,18 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
141141

142142
## Documentation
143143

144-
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.
144+
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.
145145

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

148148
### Running documentation locally
149149

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

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

157157
### Documentation for previous releases
158158

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ 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.'
3437
].join('|')
3538

3639
const args = [

0 commit comments

Comments
 (0)