1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-17 02:54:01 +02:00

Switch to Hugo

This commit includes all the needed workarounds and most changes from the main branch for everything to work, like:

* removing empty lines in raw HTML that break output
* read .browserslistrc, CSS variables from disk instead of duplicating it
* using Hugo mounts
* using Hugo for the docs CSS/JS
* move ToC Sass code to a separate file while adapting it for Hugo

Thus, this patch makes our npm scripts faster since lint runs on one step and there's no separate docs assets processing.
This commit is contained in:
XhmikosR
2020-11-04 16:39:29 +02:00
parent ae87f8f7ce
commit b46f05a948
325 changed files with 4463 additions and 3596 deletions

View File

@@ -142,7 +142,7 @@ and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/s
Similarly, when contributing to Bootstrap's documentation, you should edit the
documentation source files in
[the `/bootstrap/site/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/docs).
[the `/bootstrap/site/content/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/content/docs).
**Do not edit the `gh-pages` branch.** That branch is generated from the
documentation source files and is managed separately by the Bootstrap Core Team.

View File

@@ -9,7 +9,6 @@ on:
env:
CI: true
NODE: 14.x
RUBY: 2.7.x
jobs:
docs:
@@ -24,25 +23,7 @@ jobs:
with:
node-version: "${{ env.NODE }}"
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY }}
- name: Set up Ruby env
run: |
echo "gem: --no-document" > ~/.gemrc # Disable gem docs
bundle config set clean 'true'
bundle config set deployment 'true'
- name: Set up Ruby cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}
${{ runner.os }}-ruby-v${{ env.RUBY }}-
- run: java -version
- name: Set up npm cache
uses: actions/cache@v2
@@ -53,19 +34,8 @@ jobs:
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
${{ runner.OS }}-node-v${{ env.NODE }}-
- run: ruby --version
- run: gem --version
- run: bundle --version
- run: java -version
- name: Install npm dependencies
run: npm ci
- name: Install bundler dependencies
run: bundle install --deployment --jobs=4 --retry=3 --clean
- name: Copy CSS and JS
run: npm run css-copy && npm run js-copy
- name: Test docs
run: npm run docs