Skip to content

Commit

Permalink
Modify Boostrap to be servable from Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kant2002 committed Sep 16, 2024
1 parent ffeb8f8 commit fb1ecc5
Show file tree
Hide file tree
Showing 40 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./_site
path: ./_site/custom-bootstrap

# Deployment job
deploy:
Expand Down
4 changes: 2 additions & 2 deletions hugo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageCode: "en"
title: "Bootstrap"
baseURL: "https://getbootstrap.com"
baseURL: "https://kant2002.github.io/custom-bootstrap/"

security:
enableInlineShortcodes: true
Expand Down Expand Up @@ -28,7 +28,7 @@ enableRobotsTXT: true
metaDataFormat: "yaml"
disableKinds: ["404", "taxonomy", "term", "RSS"]

publishDir: "_site"
publishDir: "_site/custom-bootstrap"

module:
mounts:
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/_index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: redirect
sitemap_exclude: true
redirect: "/docs/5.3/getting-started/introduction/"
redirect: "docs/5.3/getting-started/introduction/"
---
6 changes: 3 additions & 3 deletions site/content/docs/5.3/about/brand.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Have a need for Bootstrap's brand resources? Great! We have only a few guideline
When referencing Bootstrap, use our logo mark. Do not modify our logos in any way. Do not use Bootstrap's branding for your own open or closed source projects.

<div class="bd-brand-item px-2 py-5 mb-3 border rounded-3">
<img class="d-block img-fluid mx-auto" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Bootstrap" width="256" height="204">
<img class="d-block img-fluid mx-auto" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Bootstrap" width="256" height="204">
</div>

Our logo mark is also available in black and white. All rules for our primary logo apply to these as well.

<div class="bd-brand-logos d-sm-flex text-center bg-light rounded-3 overflow-hidden w-100 mb-3">
<div class="bd-brand-item w-100 px-2 py-5">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-black.svg" alt="Bootstrap" width="128" height="102" loading="lazy">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-black.svg" alt="Bootstrap" width="128" height="102" loading="lazy">
</div>
<div class="bd-brand-item w-100 px-2 py-5 inverse">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="Bootstrap" width="128" height="102" loading="lazy">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="Bootstrap" width="128" height="102" loading="lazy">
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.3/components/navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can replace the text within the `.navbar-brand` with an `<img>`.
<nav class="navbar bg-body-tertiary">
<div class="container">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Bootstrap" width="30" height="24">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Bootstrap" width="30" height="24">
</a>
</div>
</nav>
Expand All @@ -123,7 +123,7 @@ You can also make use of some additional utilities to add an image and text at t
<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Logo" width="30" height="24" class="d-inline-block align-text-top">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Logo" width="30" height="24" class="d-inline-block align-text-top">
Bootstrap
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions site/content/docs/5.3/examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ aliases: "/examples/"
</div>
{{ else }}
<div class="col-sm-6 col-md-3 mb-3">
<a class="d-block link-offset-1" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
<img class="img-thumbnail mb-3" srcset="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png,
/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x"
src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png"
<a class="d-block link-offset-1" href="docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
<img class="img-thumbnail mb-3" srcset="docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png,
docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x"
src="docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png"
alt=""
width="480" height="300"
loading="lazy">
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.3/examples/cheatsheet-rtl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<header class="bd-header bg-dark py-3 d-flex align-items-stretch border-bottom border-dark">
<div class="container-fluid d-flex align-items-center">
<h1 class="d-flex align-items-center fs-4 text-white mb-0">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap">
ورقة الغش
</h1>
<a href="{{< docsref "/examples/cheatsheet" >}}" class="ms-auto link-light" hreflang="en">جدول بيانات LTR</a>
Expand Down Expand Up @@ -1224,7 +1224,7 @@ <h3>شريط التنقل</h3>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"
style="filter: invert(1) grayscale(100%) brightness(200%);">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="تبديل التنقل">
Expand Down Expand Up @@ -1264,7 +1264,7 @@ <h3>شريط التنقل</h3>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="تبديل التنقل">
<span class="navbar-toggler-icon"></span>
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.3/examples/cheatsheet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<header class="bd-header bg-dark py-3 d-flex align-items-stretch border-bottom border-dark">
<div class="container-fluid d-flex align-items-center">
<h1 class="d-flex align-items-center fs-4 text-white mb-0">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap">
Cheatsheet
</h1>
<a href="{{< docsref "/examples/cheatsheet-rtl" >}}" class="ms-auto link-light" hreflang="ar">RTL cheatsheet</a>
Expand Down Expand Up @@ -1223,7 +1223,7 @@ <h3>Navbar</h3>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"
style="filter: invert(1) grayscale(100%) brightness(200%);">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
Expand Down Expand Up @@ -1263,7 +1263,7 @@ <h3>Navbar</h3>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
<img src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/examples/checkout-rtl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="container">
<main>
<div class="py-5 text-center">
<img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<img class="d-block mx-auto mb-4" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<h2>نموذج إتمام الشراء</h2>
<p class="lead">فيما يلي مثال على نموذج تم إنشاؤه بالكامل باستخدام عناصر تحكم النموذج في Bootstrap. لكل مجموعة نماذج مطلوبة حالة تحقق يمكن تشغيلها بمحاولة إرسال النموذج دون استكماله.</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/examples/checkout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="container">
<main>
<div class="py-5 text-center">
<img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<img class="d-block mx-auto mb-4" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<h2>Checkout form</h2>
<p class="lead">Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/examples/heroes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h1 class="visually-hidden">Heroes examples</h1>

<div class="px-4 py-5 my-5 text-center">
<img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<img class="d-block mx-auto mb-4" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<h1 class="display-5 fw-bold text-body-emphasis">Centered hero</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p>
Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.3/examples/offcanvas-navbar/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
extra_js:
- src: "offcanvas-navbar.js"
body_class: "bg-body-tertiary"
aliases: "/docs/5.3/examples/offcanvas/"
aliases: "docs/5.3/examples/offcanvas/"
---

<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark" aria-label="Main navigation">
Expand Down Expand Up @@ -66,7 +66,7 @@

<main class="container">
<div class="d-flex align-items-center p-3 my-3 text-white bg-purple rounded shadow-sm">
<img class="me-3" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="" width="48" height="38">
<img class="me-3" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="" width="48" height="38">
<div class="lh-1">
<h1 class="h6 mb-0 text-white lh-1">Bootstrap</h1>
<small>Since 2011</small>
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/examples/pricing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h2 class="display-6 text-center mb-4">Compare plans</h2>
<footer class="pt-4 my-md-5 pt-md-5 border-top">
<div class="row">
<div class="col-12 col-md">
<img class="mb-2" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="24" height="19">
<img class="mb-2" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="24" height="19">
<small class="d-block mb-3 text-body-secondary">&copy; 2017–{{< year >}}</small>
</div>
<div class="col-6 col-md">
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/examples/sign-in/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<main class="form-signin w-100 m-auto">
<form>
<img class="mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<img class="mb-4" src="docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>

<div class="form-floating">
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/forms/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Provide valuable, actionable feedback to your users with HTML5 form
group: forms
toc: true
extra_js:
- src: "/docs/5.3/assets/js/validate-forms.js"
- src: "docs/5.3/assets/js/validate-forms.js"
async: true
---

Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.3/getting-started/parcel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: true
thumbnail: guides/bootstrap-parcel@2x.png
---

<img class="mb-4 img-fluid rounded-3" srcset="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel@2x.png 2x" src="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png" width="2000" height="1000" alt="">
<img class="mb-4 img-fluid rounded-3" srcset="docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel@2x.png 2x" src="docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png" width="2000" height="1000" alt="">

{{< callout >}}
**Want to skip to the end?** Download the source code and working demo for this guide from the [twbs/examples repository](https://github.com/twbs/examples/tree/main/parcel). You can also [open the example in StackBlitz](https://stackblitz.com/github/twbs/examples/tree/main/parcel?file=index.html) but not run it because Parcel isn't currently supported there.
Expand Down Expand Up @@ -111,7 +111,7 @@ With dependencies installed and our project folder ready for us to start coding,
npm start
```
<img class="img-fluid" src="/docs/{{< param docs_version >}}/assets/img/guides/parcel-dev-server.png" alt="Parcel dev server running">
<img class="img-fluid" src="docs/{{< param docs_version >}}/assets/img/guides/parcel-dev-server.png" alt="Parcel dev server running">
In the next and final section to this guide, we'll import all of Bootstrap's CSS and JavaScript.
Expand Down Expand Up @@ -150,7 +150,7 @@ Importing Bootstrap into Parcel requires two imports, one into our `styles.scss`
3. **And you're done! 🎉** With Bootstrap's source Sass and JS fully loaded, your local development server should now look like this:
<img class="img-fluid" src="/docs/{{< param docs_version >}}/assets/img/guides/parcel-dev-server-bootstrap.png" alt="Parcel dev server running with Bootstrap">
<img class="img-fluid" src="docs/{{< param docs_version >}}/assets/img/guides/parcel-dev-server-bootstrap.png" alt="Parcel dev server running with Bootstrap">
Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Parcel example project](https://github.com/twbs/examples/tree/main/parcel) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.3/getting-started/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: true
thumbnail: guides/bootstrap-vite@2x.png
---

<img class="mb-4 img-fluid rounded-3" srcset="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite@2x.png 2x" src="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png" width="2000" height="1000" alt="">
<img class="mb-4 img-fluid rounded-3" srcset="docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite@2x.png 2x" src="docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png" width="2000" height="1000" alt="">

{{< callout >}}
**Want to skip to the end?** Download the source code and working demo for this guide from the [twbs/examples repository](https://github.com/twbs/examples/tree/main/vite). You can also [open the example in StackBlitz](https://stackblitz.com/github/twbs/examples/tree/main/vite?file=index.html) for live editing.
Expand Down Expand Up @@ -132,7 +132,7 @@ With dependencies installed and our project folder ready for us to start coding,
npm start
```
<img class="img-fluid" src="/docs/{{< param docs_version >}}/assets/img/guides/vite-dev-server.png" alt="Vite dev server running">
<img class="img-fluid" src="docs/{{< param docs_version >}}/assets/img/guides/vite-dev-server.png" alt="Vite dev server running">
In the next and final section to this guide, we’ll import all of Bootstrap’s CSS and JavaScript.
Expand Down Expand Up @@ -172,7 +172,7 @@ In the next and final section to this guide, we’ll import all of Bootstrap’s
3. **And you're done! 🎉** With Bootstrap's source Sass and JS fully loaded, your local development server should now look like this:
<img class="img-fluid" src="/docs/{{< param docs_version >}}/assets/img/guides/vite-dev-server-bootstrap.png" alt="Vite dev server running with Bootstrap">
<img class="img-fluid" src="docs/{{< param docs_version >}}/assets/img/guides/vite-dev-server-bootstrap.png" alt="Vite dev server running with Bootstrap">
Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Vite example project](https://github.com/twbs/examples/tree/main/vite) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
Expand Down
Loading

0 comments on commit fb1ecc5

Please sign in to comment.