mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-04-19 19:03:27 +10:00
Support project sites for github pages
See also: - https://github.com/gjtorikian/html-proofer?tab=readme-ov-file#adjusting-for-a-baseurl - https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites
This commit is contained in:
parent
ae8915f6fe
commit
72ace9ef5b
9
.github/workflows/pages-deploy.yml
vendored
9
.github/workflows/pages-deploy.yml
vendored
@ -46,20 +46,19 @@ jobs:
|
|||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
|
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
||||||
env:
|
env:
|
||||||
JEKYLL_ENV: "production"
|
JEKYLL_ENV: "production"
|
||||||
|
|
||||||
- name: Test site
|
- name: Test site
|
||||||
run: |
|
run: |
|
||||||
bundle exec htmlproofer _site \
|
bundle exec htmlproofer _site \
|
||||||
\-\-disable-external=true \
|
--disable-external=true \
|
||||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
--ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" \
|
||||||
|
--swap-urls "^${{ steps.pages.outputs.base_path }}/:/"
|
||||||
|
|
||||||
- name: Upload site artifact
|
- name: Upload site artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
|
||||||
path: "_site${{ steps.pages.outputs.base_path }}"
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
environment:
|
environment:
|
||||||
|
11
_config.yml
11
_config.yml
@ -21,10 +21,16 @@ tagline: A text-focused Jekyll theme # it will display as the sub-title
|
|||||||
description: >- # used by seo meta and the atom feed
|
description: >- # used by seo meta and the atom feed
|
||||||
A minimal, responsive and feature-rich Jekyll theme for technical writing.
|
A minimal, responsive and feature-rich Jekyll theme for technical writing.
|
||||||
|
|
||||||
# Fill in the protocol & hostname for your site.
|
# Fill in the protocol & hostname for your site (optional).
|
||||||
# e.g. 'https://username.github.io', note that it does not end with a '/'.
|
# e.g. 'https://username.github.io', note that it does not end with a '/'.
|
||||||
url: ""
|
url: ""
|
||||||
|
|
||||||
|
# The base URL of your site (optional).
|
||||||
|
# For project site, put "/your-repo-name", e.g. "/chirpy-starter"
|
||||||
|
# See also:
|
||||||
|
# - https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites
|
||||||
|
baseurl: ""
|
||||||
|
|
||||||
github:
|
github:
|
||||||
username: github_username # change to your github username
|
username: github_username # change to your github username
|
||||||
|
|
||||||
@ -125,9 +131,6 @@ pwa:
|
|||||||
|
|
||||||
paginate: 10
|
paginate: 10
|
||||||
|
|
||||||
# The base URL of your site
|
|
||||||
baseurl: ""
|
|
||||||
|
|
||||||
# ------------ The following options are not recommended to be modified ------------------
|
# ------------ The following options are not recommended to be modified ------------------
|
||||||
|
|
||||||
kramdown:
|
kramdown:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user