├── .stylelintignore ├── .release-please-manifest.json ├── .gitignore ├── .github ├── FUNDING.yml └── workflows │ ├── lint.yml │ └── release-please.yml ├── assets └── hb │ ├── scss │ ├── _root.scss │ ├── _variables.scss │ ├── _utilities.scss │ ├── _mixins.scss │ └── index.tmpl.scss │ ├── init │ └── index.tmpl.ts │ ├── purgecss.config.toml │ ├── templates │ └── purgecss.json.html │ ├── js │ └── index.tmpl.ts │ └── purgecss.config.js ├── layouts ├── partials │ ├── hb │ │ ├── functions │ │ │ ├── page-images.html │ │ │ ├── debug.html │ │ │ ├── logo.html │ │ │ ├── page-featured-image.html │ │ │ ├── module-exists.html │ │ │ ├── page-thumbnail.html │ │ │ ├── image-resize.html │ │ │ ├── image-size.html │ │ │ └── pages.html │ │ └── assets │ │ │ ├── css.html │ │ │ ├── purgecss.html │ │ │ ├── init.html │ │ │ ├── js.html │ │ │ └── css-resource.html │ ├── hugopress │ │ └── modules │ │ │ └── hb │ │ │ ├── hooks │ │ │ ├── body-end.html │ │ │ ├── head-end.html │ │ │ └── head-begin.html │ │ │ └── attributes │ │ │ ├── document.html │ │ │ ├── hb-alias-refresh-meta.html │ │ │ ├── body.html │ │ │ └── hb-main.html │ └── _funcs │ │ └── get-page-images.html ├── alias.html └── _default │ ├── baseof.html │ └── _markup │ ├── render-blockquote-regular.html │ └── render-table.html ├── .stylelintrc.json ├── renovate.json ├── .prettierrc ├── .mergify.yml ├── .eslintrc.cjs ├── go.mod ├── postcss.config.js ├── package.json ├── release-please-config.json ├── LICENSE ├── README.md ├── hugo.toml ├── go.sum ├── CODE_OF_CONDUCT.md └── CHANGELOG.md /.stylelintignore: -------------------------------------------------------------------------------- 1 | **/*.tmpl.scss 2 | -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | ".": "0.16.2" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .hugo_build.lock 2 | public/ 3 | resources/ 4 | node_modules/ 5 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: razonyang 2 | custom: 3 | - https://paypal.me/razonyang 4 | -------------------------------------------------------------------------------- /assets/hb/scss/_root.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | --#{$prefix}top-offset: #{$hb-top-offset}; 3 | } 4 | -------------------------------------------------------------------------------- /assets/hb/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | $prefix: hb- !default; 2 | $hb-top-offset: 24px !default; 3 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/page-images.html: -------------------------------------------------------------------------------- 1 | {{- return .Resources.ByType "image" -}} 2 | -------------------------------------------------------------------------------- /assets/hb/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | .hb-top-offset { 2 | top: var(--#{$prefix}top-offset); 3 | } 4 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/debug.html: -------------------------------------------------------------------------------- 1 | {{- return default false site.Params.hb.debug -}} 2 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/hooks/body-end.html: -------------------------------------------------------------------------------- 1 | {{- partialCached "hb/assets/js" .Page }} 2 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/logo.html: -------------------------------------------------------------------------------- 1 | {{- return (resources.Get (default "/images/logo.png" site.Params.hb.logo)) -}} 2 | -------------------------------------------------------------------------------- /assets/hb/init/index.tmpl.ts: -------------------------------------------------------------------------------- 1 | {{- range resources.Match "hb/modules/*/init/index.ts" }} 2 | {{- printf "import '%s';" . }}; 3 | {{- end }} 4 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/attributes/document.html: -------------------------------------------------------------------------------- 1 | {{- return dict 2 | "data-bs-theme" (default "light" site.Params.hb.color) 3 | }} 4 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/hooks/head-end.html: -------------------------------------------------------------------------------- 1 | {{- partialCached "hb/assets/css" .Page }} 2 | {{- partialCached "hb/assets/init" .Page }} 3 | -------------------------------------------------------------------------------- /layouts/partials/hb/assets/css.html: -------------------------------------------------------------------------------- 1 | {{- $style := partial "hb/assets/css-resource" . }} 2 | 3 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/page-featured-image.html: -------------------------------------------------------------------------------- 1 | {{- $images := partialCached "hb/functions/page-images" . . }} 2 | {{- return $images.GetMatch "feature*" -}} 3 | -------------------------------------------------------------------------------- /assets/hb/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin top-offset($position:"") { 2 | @if $position != "" { 3 | position: $position; 4 | } 5 | 6 | top: var(--#{$prefix}top-offset); 7 | } 8 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/attributes/hb-alias-refresh-meta.html: -------------------------------------------------------------------------------- 1 | {{- return dict 2 | "http-equiv" "refresh" 3 | "content" (printf "0; url=%s" .Page.Permalink) 4 | -}} 5 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/hooks/head-begin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- partialCached "hb/assets/purgecss" .Page }} 4 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/module-exists.html: -------------------------------------------------------------------------------- 1 | {{- $exists := false }} 2 | {{- $module := . }} 3 | {{- range hugo.Deps }} 4 | {{- if eq .Path $module }} 5 | {{- $exists = true }} 6 | {{- break }} 7 | {{- end }} 8 | {{- end }} 9 | {{- return $exists }} 10 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/attributes/body.html: -------------------------------------------------------------------------------- 1 | {{- $attrs := newScratch }} 2 | {{- with .Page.Layout }} 3 | {{- $attrs.Set "data-layout" . }} 4 | {{- end }} 5 | {{- with .Page.Section }} 6 | {{- $attrs.Set "data-section" . }} 7 | {{- end }} 8 | {{- return $attrs.Values }} 9 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard-scss", 3 | "rules": { 4 | "at-rule-no-unknown": null, 5 | "color-function-notation": null, 6 | "scss/at-rule-no-unknown": true, 7 | "scss/at-extend-no-missing-placeholder": null 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/page-thumbnail.html: -------------------------------------------------------------------------------- 1 | {{- $img := partialCached "hb/functions/page-featured-image" . . }} 2 | {{- if not $img }} 3 | {{- $images := partialCached "hb/functions/page-images" . . }} 4 | {{- $img = $images.GetMatch "{*cover*,*thumbnail*}" -}} 5 | {{- end }} 6 | {{- return $img -}} 7 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: lint 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | lint: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v6 11 | - uses: actions/setup-node@v6 12 | with: 13 | node-version: 24 14 | - run: npm ci 15 | - run: npm run lint 16 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | ":dependencyDashboard" 6 | ], 7 | "packageRules": [ 8 | { 9 | "matchManagers": ["gomod"], 10 | "matchDepTypes": ["indirect"], 11 | "enabled": true 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["prettier-plugin-go-template"], 3 | "bracketSameLine": true, 4 | "goTemplateBracketSpacing": true, 5 | "overrides": [ 6 | { 7 | "files": [ 8 | "*.html" 9 | ], 10 | "options": { 11 | "parser": "go-template", 12 | "bracketSameLine": true 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /layouts/partials/hb/assets/purgecss.html: -------------------------------------------------------------------------------- 1 | {{/* Generates cross modules PurgeCSS configurations. */}} 2 | {{ $tmpl := resources.Get "hb/templates/purgecss.json.html" }} 3 | {{ $html := $tmpl | resources.ExecuteAsTemplate "/.build/purgecss.json" site.Home }} 4 | {{/* Publish the file without outputting its link on the page. */}} 5 | {{ with $html.RelPermalink }}{{ end }} 6 | -------------------------------------------------------------------------------- /.github/workflows/release-please.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - main 5 | 6 | permissions: 7 | contents: write 8 | pull-requests: write 9 | 10 | name: release-please 11 | 12 | jobs: 13 | release-please: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: googleapis/release-please@v4 17 | with: 18 | command: manifest 19 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: Automatic merge for Renovate pull requests 3 | conditions: 4 | - author=renovate[bot] 5 | actions: 6 | merge: 7 | method: rebase 8 | 9 | - name: Automatic merge on approval 10 | conditions: 11 | - "#approved-reviews-by>=1" 12 | actions: 13 | merge: 14 | method: rebase 15 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | 'eslint:recommended', 4 | 'plugin:@typescript-eslint/recommended' 5 | ], 6 | parser: '@typescript-eslint/parser', 7 | plugins: ['@typescript-eslint'], 8 | root: true, 9 | ignorePatterns: [ 10 | "*.tmpl.ts", 11 | "postcss.config.js", 12 | "purgecss.config.js" 13 | ] 14 | }; 15 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/image-resize.html: -------------------------------------------------------------------------------- 1 | {{/* Resize an image resource by the given size. */}} 2 | {{- $img := .Image }} 3 | {{- $size := .Size }} 4 | {{- $invalidTypes := slice "svg" }} 5 | {{/* ignore invalid image types, such as vector images. */}} 6 | {{- if not (in $invalidTypes $img.MediaType.SubType) }} 7 | {{- $img = $img.Resize $size }} 8 | {{- end }} 9 | {{- return $img -}} 10 | -------------------------------------------------------------------------------- /assets/hb/purgecss.config.toml: -------------------------------------------------------------------------------- 1 | classes = [ 2 | # Required by some components, such as dropdown and offcanvas. 3 | "fade", 4 | "hide", 5 | "show", 6 | "showing", 7 | ] 8 | ids = [] 9 | tags = [] 10 | attributes = [ 11 | "data-bs-theme", # Light/Dark color. 12 | "data-bs-popper", # Dropdown 13 | ] 14 | safelist_deep = [] 15 | safelist_greedy = [] 16 | safelist_standard = [] 17 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hbstack/hb 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400 // indirect 7 | github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 // indirect 8 | github.com/hugomods/base v0.7.3 // indirect 9 | github.com/hugomods/hugopress v0.5.0 // indirect 10 | github.com/twbs/bootstrap v5.3.8+incompatible // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /layouts/partials/hugopress/modules/hb/attributes/hb-main.html: -------------------------------------------------------------------------------- 1 | {{- $attrs := newScratch }} 2 | {{- $fullWidth := default (default false site.Params.hb.full_width) .Page.Params.full_width }} 3 | {{- if reflect.IsSlice $fullWidth }} 4 | {{- $fullWidth = in $fullWidth .Page.Section }} 5 | {{- end }} 6 | {{- if not $fullWidth }} 7 | {{- with index (default dict site.Params.hb.full_width_types) .Page.Type }} 8 | {{- $fullWidth = default true .enable }} 9 | {{- end }} 10 | {{- end }} 11 | {{- $attrs.Set "class" (cond $fullWidth "hb-main container-fluid" "hb-main container") }} 12 | {{- return $attrs.Values }} 13 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const { execSync } = require('child_process') 3 | 4 | // requireX fallbacks to global module if not found. 5 | global.requireX = (name) => { 6 | try { 7 | return require(name) 8 | } catch (err) { 9 | const globalPath = execSync('npm root -g').toString().trim() 10 | return require(path.join(globalPath, name)) 11 | } 12 | } 13 | 14 | const autoprefixer = requireX('autoprefixer') 15 | 16 | module.exports = { 17 | plugins: [ 18 | autoprefixer, 19 | ...process.env.HUGO_ENVIRONMENT === 'production' 20 | ? [require('./assets/hb/purgecss.config.js').default] 21 | : [], 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/image-size.html: -------------------------------------------------------------------------------- 1 | {{/* Returns the height and width of image resources. */}} 2 | {{- $height := 1 }} 3 | {{- $width := 1 }} 4 | {{- if eq .MediaType.SubType "svg" }} 5 | {{- $float := `[\d\.]+` }} 6 | {{- $delimiter := `[,|\s]` }} 7 | {{- $pattern := printf `viewBox="%s%s%s%s(%s)%s(%s)"` $float $delimiter $float $delimiter $float $delimiter $float }} 8 | {{- $viewBox := findRESubmatch $pattern .Content 1 }} 9 | {{- with index $viewBox 0 }} 10 | {{- with index . 1 }} 11 | {{- $width = float . }} 12 | {{- end }} 13 | {{- with index . 2 }} 14 | {{- $height = float . }} 15 | {{- end }} 16 | {{- end }} 17 | {{- else }} 18 | {{- $height = .Height }} 19 | {{- $width = .Width }} 20 | {{- end }} 21 | {{- return dict "Height" $height "Width" $width -}} 22 | -------------------------------------------------------------------------------- /assets/hb/templates/purgecss.json.html: -------------------------------------------------------------------------------- 1 | {{/* Initialize with empty arrays. */}} 2 | {{- $data := newScratch -}} 3 | {{- $data.Add "attributes" slice }} 4 | {{- $data.Add "classes" slice }} 5 | {{- $data.Add "ids" slice }} 6 | {{- $data.Add "safelist_deep" slice }} 7 | {{- $data.Add "safelist_greedy" slice }} 8 | {{- $data.Add "safelist_standard" slice }} 9 | {{- $data.Add "tags" slice }} 10 | {{- $resources := slice (resources.Get "hb/purgecss.config.toml") }} 11 | {{- with resources.Match "hb/modules/*/purgecss.config.*" }} 12 | {{- $resources = $resources | append . }} 13 | {{- end }} 14 | {{/* Merge config from modules. */}} 15 | {{- range $resources }} 16 | {{- $config := .Content | transform.Unmarshal }} 17 | {{- range $name, $values := $config }} 18 | {{- $data.Add $name $values }} 19 | {{- end }} 20 | {{- end }} 21 | {{- $data.Values | jsonify -}} 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hugo Bootstrap Framework (HB)", 3 | "homepage": "https://github.com/hbstack/hb", 4 | "license": "MIT", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/hbstack/hb.git" 8 | }, 9 | "author": "Razon Yang ", 10 | "bugs": { 11 | "url": "https://github.com/hbstack/hb/issues" 12 | }, 13 | "devDependencies": { 14 | "@typescript-eslint/eslint-plugin": "^8.0.0", 15 | "@typescript-eslint/parser": "^8.0.0", 16 | "eslint": "^9.0.0", 17 | "prettier": "^3.0.0", 18 | "prettier-plugin-go-template": "^0.0.15", 19 | "stylelint": "^16.0.0", 20 | "stylelint-config-standard-scss": "^16.0.0", 21 | "typescript": "^5.0.0" 22 | }, 23 | "scripts": { 24 | "lint": "npm run stylelint", 25 | "eslint": "npx eslint .", 26 | "stylelint": "npx stylelint \"**/*.scss\"" 27 | }, 28 | "dependencies": { 29 | "stylelint-scss": "^6.0.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /layouts/alias.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-alias-head-begin" "Page" .) }} 5 | {{ partialCached "hb/assets/init" .Page }} 6 | {{ .Permalink }} 7 | 8 | 9 | 10 | {{- $attrs := partial "hugopress/functions/render-attributes" (dict "Name" "hb-alias-refresh-meta" "Page" .) }} 11 | 12 | {{ partialCached "hb/assets/css" .Page }} 13 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-alias-head-end" "Page" .) }} 14 | 15 | 16 |
17 | Loading... 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /assets/hb/js/index.tmpl.ts: -------------------------------------------------------------------------------- 1 | // See https://github.com/twbs/bootstrap/blob/main/js/index.umd.js 2 | {{/* Import module's js/index.ts directly. */}} 3 | {{- range resources.Match "hb/modules/*/js/index.ts" }} 4 | import '{{ .Name }}'; 5 | {{- end }} 6 | {{- $ctx := . }} 7 | {{/* Execute module's js/index.tmpl.ts as a template. */}} 8 | {{- $pattern := `import(.+)['"]\.(.+)['"]` }} 9 | {{- range resources.Match "hb/modules/*/js/index.tmpl.ts" }} 10 | {{- $mod := . | resources.ExecuteAsTemplate (replace .Name "index.tmpl.ts" "index.ts") $ctx }} 11 | {{/* Get the module name. */}} 12 | {{- $name := "" }} 13 | {{- $matches := findRESubmatch `hb/modules/(.+)/js/index.tmpl.ts` .Name 1 }} 14 | {{- with index $matches 0 }} 15 | {{- $name = index . 1 }} 16 | {{- end }} 17 | {{- $replacement := printf `import$1'hb/modules/%s/js$2'` $name }} 18 | {{/* Resolve the JS module paths that starts with "./". */}} 19 | {{- $content := replaceRE $pattern $replacement $mod.Content }} 20 | {{- $content }} 21 | {{- end -}} 22 | -------------------------------------------------------------------------------- /layouts/partials/hb/assets/init.html: -------------------------------------------------------------------------------- 1 | {{/* JS compile options. */}} 2 | {{- $params := dict 3 | "site" .Site.Params 4 | }} 5 | {{- $options := dict 6 | "sourceMap" (cond hugo.IsProduction "" "inline") 7 | "minify" hugo.IsProduction 8 | "params" $params 9 | "targetPath" "js/init.js" 10 | }} 11 | {{/* Get JS template. */}} 12 | {{- $js := resources.Get "hb/init/index.tmpl.ts" | resources.ExecuteAsTemplate "hb/init/index.ts" . }} 13 | {{- if partialCached "hb/functions/debug" . }} 14 | {{- warnf "[hb] %s:\n%s\n" $js.Name $js.Content }} 15 | {{- end }} 16 | {{/* Compile JS. */}} 17 | {{- $js = $js | js.Build $options }} 18 | {{- if hugo.IsProduction }} 19 | {{- $js = $js | fingerprint }} 20 | {{- end }} 21 | {{/* Precache JS. */}} 22 | {{- partial "base/partial-if-exists" (dict 23 | "Name" "pwa/functions/precache.html" 24 | "Context" (dict "Page" . "URL" .RelPermalink) 25 | ) 26 | }} 27 | 32 | -------------------------------------------------------------------------------- /release-please-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", 3 | "bootstrap-sha": "24a92d71a4d2687a68fa2e4640d865efe57b00a4", 4 | "monorepo-tags": true, 5 | "release-type": "go", 6 | "tag-separator": "/", 7 | "changelog-sections": [ 8 | { "type": "BREAKING CHANGE", "section": "BREAKING CHANGES 💥"}, 9 | { "type": "chore", "section": "Miscellaneous Chores", "hidden": true }, 10 | { "type": "ci", "section": "Continuous Integration" }, 11 | { "type": "docs", "section": "Documentation 📝" }, 12 | { "type": "feat", "section": "Features ✨" }, 13 | { "type": "feature", "section": "Features ✨" }, 14 | { "type": "fix", "section": "Bug Fixes 🐞" }, 15 | { "type": "perf", "section": "Performance Improvements ⚡️" }, 16 | { "type": "style", "section": "Styles 🎨" } 17 | ], 18 | "packages": { 19 | ".": { 20 | "exclude-paths": [ 21 | "modules" 22 | ] 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- partial "hugopress/head-begin" . }} 5 | 6 | {{- block "title" . -}}{{ partial "base/title" . }}{{- end -}} 7 | 8 | {{- partial "hugopress/head-end" . }} 9 | 10 | 11 | {{- partial "hugopress/body-begin" . }} 12 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-body-begin" "Page" .) }} 13 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-main-begin" "Page" .) }} 14 | {{- $attrs := partial "hugopress/functions/render-attributes" (dict "Name" "hb-main" "Page" .) }} 15 |
16 | {{- block "main" . }}{{- end }} 17 |
18 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-main-end" "Page" .) }} 19 | {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-body-end" "Page" .) }} 20 | {{- partial "hugopress/body-end" . }} 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023 HB Framework Authors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /layouts/partials/hb/functions/pages.html: -------------------------------------------------------------------------------- 1 | {{- $pages := slice }} 2 | {{/* Fetch all regular pages when the given all is true. */}} 3 | {{- if .all }} 4 | {{- $pages = site.AllRegularPages }} 5 | {{- else }} 6 | {{- $pages = site.RegularPages }} 7 | {{- end }} 8 | {{/* Filter pages by type, multiple types separated by commas. */}} 9 | {{- with .type }} 10 | {{- $pages = where $pages "Type" "in" (split . ",") }} 11 | {{- end }} 12 | {{/* Filter pages by section, multiple sections separated by commas. */}} 13 | {{- with .section }} 14 | {{- $pages = where $pages "Section" "in" (split . ",") }} 15 | {{- end }} 16 | {{/* Filter pages by params. */}} 17 | {{- range $key, $value := . }} 18 | {{- if hasPrefix $key "params." }} 19 | {{- $pages = where $pages (replace $key "params." ".Params.") $value }} 20 | {{- end }} 21 | {{- end }} 22 | {{/* Sorting pages by the given sorting, such as Date, Date desc. */}} 23 | {{- with .sorting }} 24 | {{- $sorting := split . " " }} 25 | {{- $pages = sort $pages (index $sorting 0) (default "asc" (index $sorting 1)) }} 26 | {{- end }} 27 | {{/* Limit the number of pages. */}} 28 | {{- with .limit }} 29 | {{- $pages = first . $pages }} 30 | {{- end }} 31 | {{/* Return pages. */}} 32 | {{- return $pages -}} 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HB (Hugo Bootstrap) Framework 2 | 3 | [![Documentation](https://img.shields.io/badge/docs-references-blue?logo=hugo&style=flat-square)](https://hb.hugomods.com) 4 | [![Used By](https://flat.badgen.net/github/dependents-repo/hbstack/hb?icon=hugo&label=used+by)](https://github.com/hbstack/hb/network/dependents) 5 | ![Hugo Requirements](https://img.shields.io/badge/dynamic/json?color=important&label=requirements&query=requirements&logo=hugo&style=flat-square&url=https://api.razonyang.com/v1/hugo/modules/github.com/hbstack/hb) 6 | [![License](https://img.shields.io/github/license/hbstack/hb?style=flat-square)](https://github.com/hbstack/hb/blob/main/LICENSE) 7 | [![Version](https://img.shields.io/badge/dynamic/json?color=blue&label=version&query=name&url=https://api.razonyang.com/v1/github/tag/hbstack/hb&style=flat-square)](https://github.com/hbstack/hb/tags) 8 | [![Lint](https://github.com/hbstack/hb/actions/workflows/lint.yml/badge.svg?style=flat-square)](https://github.com/hbstack/hb/actions/workflows/lint.yml) 9 | 10 | HB is a Hugo theme framework that built on top of [Hugo](https://gohugo.io) and [Bootstrap v5.3.0+](https://getbootstrap.com). 11 | 12 | ## Backers 13 | 14 | | Name | Name | Name | 15 | | :--: | :--: | :--: | 16 | | [Wilson E. Alvarez](https://github.com/Rubonne) | [Luigi](https://github.com/luigi8bits) | [Elio Gavlinski](https://github.com/gavlinski) | 17 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-blockquote-regular.html: -------------------------------------------------------------------------------- 1 | {{- $params := site.Params.hb.blockquotes }} 2 | {{- $borderClass := "" }} 3 | {{- if $params.bordered }} 4 | {{- $borderClass = "border-start ps-3 py-1" }} 5 | {{- with default "primary" $params.border_style }} 6 | {{- $borderClass = printf "%s border-%s" $borderClass . }} 7 | {{- end }} 8 | {{- with default 4 $params.border_width }} 9 | {{- $borderClass = printf "%s border-%d" $borderClass . }} 10 | {{- end }} 11 | {{- end }} 12 | {{- $class := slice "blockquote" }} 13 | {{- with .Attributes.class }} 14 | {{- $class = $class | append . }} 15 | {{- end }} 16 | {{- if or (isset .Attributes "align") (isset .Attributes "caption") }} 17 |
19 |
22 | {{ .Text }} 23 |
24 | {{- with .Attributes.caption }} 25 | {{- $caption := . | $.Page.RenderString }} 26 | 31 | {{- end }} 32 |
33 | {{- else }} 34 |
37 | {{ .Text }} 38 |
39 | {{- end }} 40 | -------------------------------------------------------------------------------- /layouts/partials/hb/assets/js.html: -------------------------------------------------------------------------------- 1 | {{- $page := . }} 2 | {{/* JS compile options. */}} 3 | {{- $params := site.Params.hb }} 4 | {{- $bundle := default "hb" $params.js_bundle_name }} 5 | {{- $targetPath := printf "js/%s.js" $bundle }} 6 | {{- $options := dict 7 | "sourceMap" (cond hugo.IsProduction "" "inline") 8 | "minify" hugo.IsProduction 9 | "params" $params 10 | "targetPath" $targetPath 11 | }} 12 | {{/* Get JS template. */}} 13 | {{- $js := resources.Get "hb/js/index.tmpl.ts" | resources.ExecuteAsTemplate "hb/js/index.ts" . }} 14 | {{- if partialCached "hb/functions/debug" . }} 15 | {{- warnf "[hb] %s:\n%s\n" $js.Name $js.Content }} 16 | {{- end }} 17 | {{/* Compile JS. */}} 18 | {{- $js = $js | js.Build $options }} 19 | {{- $js = slice $js }} 20 | {{/* Append third-party self-complied JS resources. */}} 21 | {{- range $name, $module := .Site.Params.hb.modules }} 22 | {{- with .js_resources }} 23 | {{- range . }} 24 | {{- $js = $js | append (partialCached .partial $page) }} 25 | {{- end }} 26 | {{- end }} 27 | {{- end }} 28 | {{- $js = $js | resources.Concat $targetPath }} 29 | {{- if hugo.IsProduction }} 30 | {{- $js = $js | fingerprint }} 31 | {{- end }} 32 | {{/* Precache JS. */}} 33 | {{- partial "base/partial-if-exists" (dict 34 | "Name" "pwa/functions/precache.html" 35 | "Context" (dict "Page" . "URL" $js.RelPermalink) 36 | ) 37 | }} 38 | 42 | -------------------------------------------------------------------------------- /hugo.toml: -------------------------------------------------------------------------------- 1 | [module.hugoVersion] 2 | extended = true 3 | min = "0.134.0" 4 | 5 | [[module.imports]] 6 | path = "github.com/hugomods/hugopress" 7 | 8 | [[module.imports]] 9 | path = "github.com/hugomods/base" 10 | 11 | [[module.imports]] 12 | path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5" 13 | 14 | [params.hugopress.modules.hb.attributes.document] 15 | cacheable = true 16 | 17 | [params.hugopress.modules.hb.attributes.body] 18 | 19 | [params.hugopress.modules.hb.attributes.hb-main] 20 | 21 | [params.hugopress.modules.hb.attributes.hb-alias-refresh-meta] 22 | 23 | [params.hugopress.modules.hb.hooks.head-begin] 24 | cacheable = true 25 | 26 | [params.hugopress.modules.hb.hooks.head-end] 27 | cacheable = true 28 | 29 | [params.hugopress.modules.hb.hooks.body-end] 30 | cacheable = true 31 | weight = 1000 32 | 33 | [params.hb] 34 | css_bundle_name = "hb" 35 | js_bundle_name = "hb" 36 | logo = "/images/logo.png" 37 | color = "light" # default color mode, light or dark. 38 | sass_transpiler = "dartsass" # dartsass or libsass (deprecated). 39 | 40 | [params.hb.styles] 41 | prefix = "hb-" # CSS variables prefix. 42 | # primary = "#0d6efd" # hex color code. 43 | hb_top_offset = "24px" # the default top offset, in pixels, for internal use. 44 | 45 | [params.hb.tables] 46 | align = "" # vertical alignment: top, middle or bottom. 47 | bordered = true 48 | border_style = "" # similar to the style. 49 | group_divider = false 50 | hover = true 51 | striped = true 52 | striped_columns = false 53 | style = "" # light, dark, primary, success, warning, danger and so on. 54 | thead_style = "" # similar to the style. 55 | 56 | [params.hb.blockquotes] 57 | bordered = true 58 | border_width = 4 # 1-5. 59 | border_style = "primary" 60 | -------------------------------------------------------------------------------- /layouts/partials/_funcs/get-page-images.html: -------------------------------------------------------------------------------- 1 | {{- $imgs := slice }} 2 | {{- $imgParams := .Params.images }} 3 | {{- $resources := .Resources.ByType "image" -}} 4 | {{/* Find featured image resources if the images parameter is empty. */}} 5 | {{- if not $imgParams }} 6 | {{- $featured := $resources.GetMatch "*feature*" -}} 7 | {{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} 8 | {{- with $featured }} 9 | {{- $imgs = $imgs | append (dict 10 | "Name" .Name 11 | "Image" . 12 | "RelPermalink" .RelPermalink 13 | "Permalink" .Permalink) }} 14 | {{- end }} 15 | {{- end }} 16 | {{/* Use the first one of site images as the fallback. */}} 17 | {{- if and (not $imgParams) (not $imgs) }} 18 | {{- with site.Params.images }} 19 | {{- $imgParams = first 1 . }} 20 | {{- end }} 21 | {{- end }} 22 | {{/* Parse page's images parameter. */}} 23 | {{- range $imgParams }} 24 | {{- $img := . }} 25 | {{- $url := urls.Parse $img }} 26 | {{- if eq $url.Scheme "" }} 27 | {{/* Internal image. */}} 28 | {{- $res := false }} 29 | {{- if hasPrefix $img "/" }} 30 | {{- $res = resources.GetMatch $img }} 31 | {{- else }} 32 | {{- $res = $resources.GetMatch $img }} 33 | {{- end }} 34 | {{- with $res -}} 35 | {{/* Image resource. */}} 36 | {{- $imgs = $imgs | append (dict 37 | "Name" $img 38 | "Image" . 39 | "RelPermalink" .RelPermalink 40 | "Permalink" .Permalink) }} 41 | {{- else }} 42 | {{- $imgs = $imgs | append (dict 43 | "Name" $img 44 | "RelPermalink" (relURL $img) 45 | "Permalink" (absURL $img) 46 | ) }} 47 | {{- end }} 48 | {{- else }} 49 | {{/* External image */}} 50 | {{- $imgs = $imgs | append (dict 51 | "Name" $img 52 | "RelPermalink" $img 53 | "Permalink" $img 54 | ) }} 55 | {{- end }} 56 | {{- end }} 57 | {{- return $imgs }} 58 | -------------------------------------------------------------------------------- /assets/hb/purgecss.config.js: -------------------------------------------------------------------------------- 1 | let purgeCSSPlugin = requireX('@fullhuman/postcss-purgecss') 2 | const stats = './hugo_stats.json' 3 | const path = require('path') 4 | const fs = require('fs') 5 | fs.access(stats, fs.F_OK, (err) => { 6 | if (err) { 7 | throw new Error('Hugo stats file not found, please enable the "build.writeStats".') 8 | } 9 | }) 10 | 11 | let config = {}; 12 | try { 13 | let filename = path.join(process.env.HUGO_PUBLISHDIR, ".build", "purgecss.json") 14 | let found = true 15 | if (!fs.existsSync(filename)) { 16 | found = false 17 | const files = fs.readdirSync(process.env.HUGO_PUBLISHDIR) 18 | for (file of files) { 19 | const fp = path.join(process.env.HUGO_PUBLISHDIR, file) 20 | const stats = fs.statSync(fp) 21 | if (stats.isDirectory()) { 22 | filename = path.join(fp, ".build", "purgecss.json") 23 | if (fs.existsSync(filename)) { 24 | found = true 25 | break 26 | } 27 | } 28 | } 29 | } 30 | if (found === false) { 31 | throw new Error('No PurgeCSS configuration found.') 32 | } 33 | let rawConfig = fs.readFileSync(filename) 34 | config = JSON.parse(rawConfig) 35 | } catch (err) { 36 | throw new Error(`Failed to parse runtime PurgeCSS config.\nPlease enable the "--renderToDisk" if you are using Hugo server.\n${err}`) 37 | } 38 | 39 | if (typeof purgeCSSPlugin !== 'function') { 40 | // Compatible with v7.0.0. 41 | purgeCSSPlugin = purgeCSSPlugin.purgeCSSPlugin 42 | } 43 | const purgecss = purgeCSSPlugin({ 44 | content: [stats], 45 | defaultExtractor: (content) => { 46 | let els = JSON.parse(content).htmlElements 47 | return els.tags.concat(config.tags, els.classes, config.classes, els.ids, config.ids) 48 | }, 49 | safelist: { 50 | standard: config.safelist_standard, 51 | deep: config.safelist_deep, 52 | greedy: config.safelist_greedy 53 | }, 54 | dynamicAttributes: config.attributes, 55 | }); 56 | 57 | exports.default = purgecss -------------------------------------------------------------------------------- /layouts/partials/hb/assets/css-resource.html: -------------------------------------------------------------------------------- 1 | {{- $debug := partialCached "hb/functions/debug" . }} 2 | {{- $dirs := slice "" }} 3 | {{/* Check if there is RTL site. */}} 4 | {{- if where site.Sites "Language.LanguageDirection" "rtl" }} 5 | {{- $dirs = $dirs | append "rtl" }} 6 | {{- end }} 7 | {{- $page := . }} 8 | {{- $params := $page.Site.Params }} 9 | {{- $context := dict 10 | "params" $params 11 | }} 12 | {{- $res := false }} 13 | {{- $bundle := default "hb" $params.hb.css_bundle_name }} 14 | {{- range $dir := $dirs }} 15 | {{- $rtl := eq $dir "rtl" }} 16 | {{- $suffix := cond $rtl ".rtl" "" }} 17 | {{/* SCSS options. */}} 18 | {{- $sassSilenceDeprecations := slice "import" "color-functions" "global-builtin" }} 19 | {{- $options := dict 20 | "transpiler" (default "dartsass" $params.hb.sass_transpiler) 21 | "silenceDeprecations" ( 22 | cond 23 | $debug 24 | slice 25 | $sassSilenceDeprecations 26 | ) 27 | "targetPath" (printf "css/%s%s.css" $bundle $suffix) 28 | "enableSourceMap" hugo.IsProduction 29 | "vars" site.Params.hb.styles 30 | }} 31 | {{- if hugo.IsProduction }} 32 | {{- $options = merge $options (dict 33 | "outputStyle" "compressed") 34 | }} 35 | {{- end }} 36 | {{/* Load style template. */}} 37 | {{- $tmpl := resources.Get "hb/scss/index.tmpl.scss" }} 38 | {{/* Compile SCSS. The target path MUST begin with "hb/scss/*" for resolving SASS/SCSS modules. */}} 39 | {{- $style := $tmpl | resources.ExecuteAsTemplate (printf "hb/scss/index%s.scss" $suffix) $context }} 40 | {{- if $debug }} 41 | {{- warnf "[hb] %s:\n%s\n" $style.Name $style.Content }} 42 | {{- end }} 43 | {{- $style = $style | toCSS $options }} 44 | {{- $postCSSOpts := dict 45 | "use" (cond $rtl "rtlcss" "") 46 | }} 47 | {{- $style = $style | css.PostCSS $postCSSOpts }} 48 | {{- if hugo.IsProduction }} 49 | {{- $style = $style | fingerprint | resources.PostProcess }} 50 | {{- end -}} 51 | {{/* Precache both of LTR and RTL CSS bundles. */}} 52 | {{- partial "base/partial-if-exists" (dict 53 | "Name" "pwa/functions/precache.html" 54 | "Context" (dict "Page" $page "URL" $style.RelPermalink) 55 | ) 56 | }} 57 | {{- $res = $style }} 58 | {{- if eq $dir $page.Site.Language.LanguageDirection }} 59 | {{- break }} 60 | {{- end }} 61 | {{- end }} 62 | {{- return $res }} 63 | -------------------------------------------------------------------------------- /assets/hb/scss/index.tmpl.scss: -------------------------------------------------------------------------------- 1 | {{- $context := . }} 2 | 3 | // Configuration 4 | @import "../../scss/bootstrap/functions"; 5 | 6 | // Variables 7 | @import "hugo:vars"; 8 | {{ range resources.Match "hb/modules/*/scss/variables.tmpl.scss" }} 9 | {{- $vars := . | resources.ExecuteAsTemplate . $context }} 10 | {{- $vars.Content }} 11 | {{ end }} 12 | @import "variables"; 13 | @import "../../scss/bootstrap/variables"; 14 | @import "../../scss/bootstrap/variables-dark"; 15 | 16 | @import "../../scss/bootstrap/maps"; 17 | @import "mixins"; 18 | @import "../../scss/bootstrap/mixins"; 19 | @import "../../scss/bootstrap/utilities"; 20 | 21 | // Layout & components 22 | @import "root"; 23 | @import "../../scss/bootstrap/root"; 24 | @import "../../scss/bootstrap/reboot"; 25 | @import "../../scss/bootstrap/type"; 26 | @import "../../scss/bootstrap/images"; 27 | @import "../../scss/bootstrap/containers"; 28 | @import "../../scss/bootstrap/grid"; 29 | @import "../../scss/bootstrap/tables"; 30 | @import "../../scss/bootstrap/forms"; 31 | @import "../../scss/bootstrap/buttons"; 32 | @import "../../scss/bootstrap/transitions"; 33 | @import "../../scss/bootstrap/dropdown"; 34 | @import "../../scss/bootstrap/button-group"; 35 | @import "../../scss/bootstrap/nav"; 36 | @import "../../scss/bootstrap/navbar"; 37 | @import "../../scss/bootstrap/card"; 38 | @import "../../scss/bootstrap/accordion"; 39 | @import "../../scss/bootstrap/breadcrumb"; 40 | @import "../../scss/bootstrap/pagination"; 41 | @import "../../scss/bootstrap/badge"; 42 | @import "../../scss/bootstrap/alert"; 43 | @import "../../scss/bootstrap/progress"; 44 | @import "../../scss/bootstrap/list-group"; 45 | @import "../../scss/bootstrap/close"; 46 | @import "../../scss/bootstrap/toasts"; 47 | @import "../../scss/bootstrap/modal"; 48 | @import "../../scss/bootstrap/tooltip"; 49 | @import "../../scss/bootstrap/popover"; 50 | @import "../../scss/bootstrap/carousel"; 51 | @import "../../scss/bootstrap/spinners"; 52 | @import "../../scss/bootstrap/offcanvas"; 53 | @import "../../scss/bootstrap/placeholders"; 54 | 55 | // Helpers 56 | @import "../../scss/bootstrap/helpers"; 57 | 58 | // Utilities 59 | @import "../../scss/bootstrap/utilities/api"; 60 | @import "utilities"; 61 | 62 | // Modules 63 | {{- range resources.Match "hb/modules/*/scss/index.scss" }} 64 | @import "{{ replace .Name "hb/modules" "../modules" | strings.TrimPrefix `/` }}"; 65 | {{- end }} 66 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 h1:SmpwwN3DNzJWbV+IT8gaFu07ENUFpCvKou5BHYUKuVs= 2 | github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200/go.mod h1:kx8MBj9T7SFR8ZClWvKZPmmUxBaltkoXvnWlZZcSnYA= 3 | github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400/go.mod h1:uekq1D4ebeXgduLj8VIZy8TgfTjrLdSl6nPtVczso78= 4 | github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+yb0/t3/rau1j8XlAxLE4CyXns2fqQbyqWfs= 5 | github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI= 6 | github.com/hugomods/base v0.4.1 h1:Wadju82kW7m60sA1FIECB2HvYboUOBUL6rCypMuTI74= 7 | github.com/hugomods/base v0.4.1/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 8 | github.com/hugomods/base v0.4.2/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 9 | github.com/hugomods/base v0.5.0/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 10 | github.com/hugomods/base v0.6.0/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 11 | github.com/hugomods/base v0.7.0/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 12 | github.com/hugomods/base v0.7.1/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 13 | github.com/hugomods/base v0.7.2/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 14 | github.com/hugomods/base v0.7.3/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4= 15 | github.com/hugomods/hugopress v0.2.3 h1:tbQlJkGcou1KQJOeCN7E3oK8ZREFZoP3kSHcM/Kz718= 16 | github.com/hugomods/hugopress v0.2.3/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= 17 | github.com/hugomods/hugopress v0.4.0/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= 18 | github.com/hugomods/hugopress v0.4.1/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= 19 | github.com/hugomods/hugopress v0.5.0/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= 20 | github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ= 21 | github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 22 | github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 23 | github.com/twbs/bootstrap v5.3.4+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 24 | github.com/twbs/bootstrap v5.3.5+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 25 | github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 26 | github.com/twbs/bootstrap v5.3.7+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 27 | github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 28 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-table.html: -------------------------------------------------------------------------------- 1 | {{- $params := site.Params.hb.tables }} 2 | {{- $class := "table" }} 3 | {{- $theadClass := slice }} 4 | {{- $tbodyClass := slice }} 5 | {{- $borderless := default false .Attributes._borderless }} 6 | {{- $borderStyle := default $params.border_style .Attributes._border_style }} 7 | {{- if $borderless }} 8 | {{- $class = printf "%s table-borderless" $class }} 9 | {{- else }} 10 | {{- if default $params.bordered .Attributes._bordered }} 11 | {{- $class = printf "%s table-bordered" $class }} 12 | {{- end }} 13 | {{- with $borderStyle }} 14 | {{- $class = printf "%s border-%s" $class . }} 15 | {{- end }} 16 | {{- end }} 17 | {{- with default $params.align .Attributes._align }} 18 | {{- $class = printf "%s align-%s" $class . }} 19 | {{- end }} 20 | {{- if default $params.hover .Attributes._hover }} 21 | {{- $class = printf "%s table-hover" $class }} 22 | {{- end }} 23 | {{- if default $params.striped .Attributes._striped }} 24 | {{- $class = printf "%s table-striped" $class }} 25 | {{- end }} 26 | {{- if default $params.striped_columns .Attributes._striped_columns }} 27 | {{- $class = printf "%s table-striped-columns" $class }} 28 | {{- end }} 29 | {{- with .Attributes._size }} 30 | {{- $class = printf "%s table-%s" $class . }} 31 | {{- end }} 32 | {{- with default $params.style .Attributes._style }} 33 | {{- $class = printf "%s table-%s" $class . }} 34 | {{- end }} 35 | {{- with default $params.thead_style .Attributes._thead_style }} 36 | {{- $theadClass = $theadClass | append (printf "table-%s" .) }} 37 | {{- end }} 38 | {{- if default $params.group_divider .Attributes._group_divider }} 39 | {{- $tbodyClass = $tbodyClass | append "table-group-divider" }} 40 | {{- with $borderStyle }} 41 | {{- $tbodyClass = $tbodyClass | append (printf "border-%s" .) }} 42 | {{- end }} 43 | {{- end }} 44 | {{- $alignmentClasses := dict 45 | "center" "text-center" 46 | "left" "text-start" 47 | "right" "text-end" 48 | }} 49 | {{- with .Attributes.class }} 50 | {{- $class = printf "%s %s" $class . }} 51 | {{- end }} 52 |
53 | 61 | {{- with .Attributes._caption }} 62 | 63 | {{- end }} 64 | {{- if default true .Attributes._thead }} 65 | 67 | {{- range .THead }} 68 | 69 | {{- range . }} 70 | 74 | {{- end }} 75 | 76 | {{- end }} 77 | 78 | {{- end }} 79 | 81 | {{- range .TBody }} 82 | 83 | {{- range . }} 84 | 88 | {{- end }} 89 | 90 | {{- end }} 91 | 92 |
{{ . }}
72 | {{- .Text -}} 73 |
86 | {{- .Text -}} 87 |
93 |
94 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | razonyang@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.16.2](https://github.com/hbstack/hb/compare/v0.16.1...v0.16.2) (2025-03-31) 4 | 5 | 6 | ### Bug Fixes 🐞 7 | 8 | * remove debug codes ([00d6dc9](https://github.com/hbstack/hb/commit/00d6dc998f852bf4c2a7f21280eeee2d7342cc60)) 9 | 10 | ## [0.16.1](https://github.com/hbstack/hb/compare/v0.16.0...v0.16.1) (2025-03-31) 11 | 12 | 13 | ### Bug Fixes 🐞 14 | 15 | * **deps:** update dependency stylelint-scss to v6.10.1 ([972e1fd](https://github.com/hbstack/hb/commit/972e1fdc1c970804f774255445bbc7a2ee5f970a)) 16 | * **deps:** update dependency stylelint-scss to v6.11.0 ([b8872f0](https://github.com/hbstack/hb/commit/b8872f0e6a7c8a6c56938d949567fbff35d1f8d0)) 17 | * **deps:** update dependency stylelint-scss to v6.11.1 ([114a9cc](https://github.com/hbstack/hb/commit/114a9ccc063ffe2dc1d4183f084fb1532760bfdf)) 18 | * remove the hb.sass_silence_deprecations parameter ([0dc9e4d](https://github.com/hbstack/hb/commit/0dc9e4d30fcd63a127556bcc83279e9c1a629274)) 19 | * silence Dart Sass deprecations ([#336](https://github.com/hbstack/hb/issues/336)) ([0dc9e4d](https://github.com/hbstack/hb/commit/0dc9e4d30fcd63a127556bcc83279e9c1a629274)) 20 | 21 | ## [0.16.0](https://github.com/hbstack/hb/compare/v0.15.4...v0.16.0) (2024-11-24) 22 | 23 | 24 | ### Features ✨ 25 | 26 | * add the `hb.sass_silence_deprecations` parameter to silence deprecations from Dart Sass ([#280](https://github.com/hbstack/hb/issues/280)) ([02d49a0](https://github.com/hbstack/hb/commit/02d49a04b0c9ec8817e2bcacba0ab1741064c626)) 27 | 28 | 29 | ### Bug Fixes 🐞 30 | 31 | * empty `params` passed to js.Build ([#282](https://github.com/hbstack/hb/issues/282)) ([7243fd9](https://github.com/hbstack/hb/commit/7243fd91cfdeff9e9a90f1c0d294cd65c1d67d0b)), closes [#275](https://github.com/hbstack/hb/issues/275) 32 | 33 | ## [0.15.4](https://github.com/hbstack/hb/compare/v0.15.3...v0.15.4) (2024-11-24) 34 | 35 | 36 | ### Bug Fixes 🐞 37 | 38 | * compatible with the changes of @fullhuman/postcss-purgecss v7.0.0 ([#279](https://github.com/hbstack/hb/issues/279)) ([56511db](https://github.com/hbstack/hb/commit/56511dbb05d4a112353ffaba41f9fe466eb882bc)) 39 | * **deps:** update dependency stylelint-scss to v6.10.0 ([1884872](https://github.com/hbstack/hb/commit/1884872695ff630bf36891b48fbff4f45111976a)) 40 | * **deps:** update dependency stylelint-scss to v6.6.0 ([5ee97ca](https://github.com/hbstack/hb/commit/5ee97ca620d5580ba7e0f2387e1bc08afc7a7a3b)) 41 | * **deps:** update dependency stylelint-scss to v6.7.0 ([59a5937](https://github.com/hbstack/hb/commit/59a5937326eedb18e0906a55fd073547c079dced)) 42 | * **deps:** update dependency stylelint-scss to v6.8.0 ([d6d37e9](https://github.com/hbstack/hb/commit/d6d37e96ae021b92ffb6318c2295e883f31975aa)) 43 | * **deps:** update dependency stylelint-scss to v6.8.1 ([8fbde1b](https://github.com/hbstack/hb/commit/8fbde1bbac5ef3d516f3159d936214d204c86734)) 44 | * **deps:** update dependency stylelint-scss to v6.9.0 ([e46ed5e](https://github.com/hbstack/hb/commit/e46ed5ef6600d6497517597b17e836824b045407)) 45 | 46 | ## [0.15.3](https://github.com/hbstack/hb/compare/v0.15.2...v0.15.3) (2024-09-10) 47 | 48 | 49 | ### Bug Fixes 🐞 50 | 51 | * allow specifying id attribute for blockquotes ([#247](https://github.com/hbstack/hb/issues/247)) ([29fd6b1](https://github.com/hbstack/hb/commit/29fd6b148c60bf8ba9cab2f1018aaab7af2be6c3)) 52 | 53 | ## [0.15.2](https://github.com/hbstack/hb/compare/v0.15.1...v0.15.2) (2024-09-10) 54 | 55 | 56 | ### Bug Fixes 🐞 57 | 58 | * allow specifying extra class name for blockquotes and tables ([#245](https://github.com/hbstack/hb/issues/245)) ([b1e818d](https://github.com/hbstack/hb/commit/b1e818d46fd8ed2ad621fb6acf45ab6c1b784378)) 59 | 60 | ## [0.15.1](https://github.com/hbstack/hb/compare/v0.15.0...v0.15.1) (2024-09-05) 61 | 62 | 63 | ### Bug Fixes 🐞 64 | 65 | * **tables:** rename _header attribute to _thead for consistent naming convention ([c866a92](https://github.com/hbstack/hb/commit/c866a92d127a3fa98c722f7b742a9cc2a018246f)) 66 | 67 | ## [0.15.0](https://github.com/hbstack/hb/compare/v0.14.0...v0.15.0) (2024-09-05) 68 | 69 | 70 | ### Features ✨ 71 | 72 | * **tables:** add the _header attribute for tables, hide the header if `false` ([#238](https://github.com/hbstack/hb/issues/238)) ([eb56400](https://github.com/hbstack/hb/commit/eb56400a29c8e56120f5b60ee13ad09ec23931dc)) 73 | 74 | ## [0.14.0](https://github.com/hbstack/hb/compare/v0.13.0...v0.14.0) (2024-09-05) 75 | 76 | 77 | ### Features ✨ 78 | 79 | * add blockquote render hook ([5e67dcb](https://github.com/hbstack/hb/commit/5e67dcb7ff846ea04679cf737caeb8e14edc04cd)) 80 | * add blockquotes parameters ([#237](https://github.com/hbstack/hb/issues/237)) ([5e67dcb](https://github.com/hbstack/hb/commit/5e67dcb7ff846ea04679cf737caeb8e14edc04cd)) 81 | * add hb.tables parameters ([#236](https://github.com/hbstack/hb/issues/236)) ([a391f95](https://github.com/hbstack/hb/commit/a391f952329239389937ac02a3f25cb36cfc8e5a)) 82 | * add table render hook ([a391f95](https://github.com/hbstack/hb/commit/a391f952329239389937ac02a3f25cb36cfc8e5a)) 83 | 84 | 85 | ### Bug Fixes 🐞 86 | 87 | * clean up unused Sass variables ([6823fbb](https://github.com/hbstack/hb/commit/6823fbbbcec92f0879f05b54e02a7d566f3f2280)) 88 | * **deps:** update dependency stylelint-scss to v6.5.1 ([dcb1f81](https://github.com/hbstack/hb/commit/dcb1f81ac1adbf6a2aaa0a3fca19945c646469c6)) 89 | 90 | ## [0.13.0](https://github.com/hbstack/hb/compare/v0.12.4...v0.13.0) (2024-08-22) 91 | 92 | 93 | ### Features ✨ 94 | 95 | * add the hb.sass_transpiler parameter, default to dartsass ([#228](https://github.com/hbstack/hb/issues/228)) ([166c5ed](https://github.com/hbstack/hb/commit/166c5edc62039b4163a6ebc3edbb1e715b8b1e41)), closes [#227](https://github.com/hbstack/hb/issues/227) 96 | 97 | ## [0.12.4](https://github.com/hbstack/hb/compare/v0.12.3...v0.12.4) (2024-08-20) 98 | 99 | 100 | ### Bug Fixes 🐞 101 | 102 | * **deps:** update dependency stylelint-scss to v6.4.1 ([d54162a](https://github.com/hbstack/hb/commit/d54162acdbeef8fa9130fe56e0b6ede267f6f765)) 103 | * **deps:** update dependency stylelint-scss to v6.5.0 ([7c52645](https://github.com/hbstack/hb/commit/7c526453e140bf689d21ed6f62fcc71eb839ab85)) 104 | * replace resources.PostCSS with css.PostCSS ([#226](https://github.com/hbstack/hb/issues/226)) ([bba72dc](https://github.com/hbstack/hb/commit/bba72dccedcaee8fa7fd6c06b8da31043e1f42ab)) 105 | 106 | ## [0.12.3](https://github.com/hbstack/hb/compare/v0.12.2...v0.12.3) (2024-06-16) 107 | 108 | 109 | ### Performance Improvements ⚡️ 110 | 111 | * cache head-begin hook ([c644fbc](https://github.com/hbstack/hb/commit/c644fbca4e9ff9acb92f9a2c10ac95704ba54e76)) 112 | 113 | ## [0.12.2](https://github.com/hbstack/hb/compare/v0.12.1...v0.12.2) (2024-03-12) 114 | 115 | 116 | ### Bug Fixes 🐞 117 | 118 | * **deps:** update dependency stylelint-scss to v6.2.1 ([c56fc57](https://github.com/hbstack/hb/commit/c56fc57793c78d314229a0f945783954c9ccad2b)) 119 | * hb/assets/css-resource returns false sometime on local development ([#192](https://github.com/hbstack/hb/issues/192)) ([32dd685](https://github.com/hbstack/hb/commit/32dd685874399935c2fc5762883df3ef569f8a0e)) 120 | 121 | ## [0.12.1](https://github.com/hbstack/hb/compare/v0.12.0...v0.12.1) (2024-03-04) 122 | 123 | 124 | ### Bug Fixes 🐞 125 | 126 | * **deps:** update dependency stylelint-scss to v6.2.0 ([90e7557](https://github.com/hbstack/hb/commit/90e75576a7c516fcf6fdbf562839fc9d23be394b)) 127 | * move data-layout and data-section attributes from .hb-main to <body> element ([#184](https://github.com/hbstack/hb/issues/184)) ([f5a2ba5](https://github.com/hbstack/hb/commit/f5a2ba5f04c7b82d63ef986768340b64c2fa805b)) 128 | 129 | ## [0.12.0](https://github.com/hbstack/hb/compare/v0.11.2...v0.12.0) (2024-02-27) 130 | 131 | 132 | ### Features ✨ 133 | 134 | * add the data-layout and data-section attributes for hb-main element for styling purpose ([#180](https://github.com/hbstack/hb/issues/180)) ([6c8b086](https://github.com/hbstack/hb/commit/6c8b0864482ad5e993163d739a67da4f8a08afc2)) 135 | 136 | ## [0.11.2](https://github.com/hbstack/hb/compare/v0.11.1...v0.11.2) (2024-02-23) 137 | 138 | 139 | ### Bug Fixes 🐞 140 | 141 | * rename purgecss.config.js to assets/hb/purgecss.config.js, to be vendorable ([#176](https://github.com/hbstack/hb/issues/176)) ([ba62ad2](https://github.com/hbstack/hb/commit/ba62ad2da403e665aad27872138d9112d9b028d4)) 142 | 143 | ## [0.11.1](https://github.com/hbstack/hb/compare/v0.11.0...v0.11.1) (2024-02-21) 144 | 145 | 146 | ### Bug Fixes 🐞 147 | 148 | * remove the leading slash from module SCSS path ([#173](https://github.com/hbstack/hb/issues/173)) ([5c58d40](https://github.com/hbstack/hb/commit/5c58d40a8b69f711b20fc8ffa30e11ac28af4f4e)) 149 | 150 | ## [0.11.0](https://github.com/hbstack/hb/compare/v0.10.0...v0.11.0) (2024-02-03) 151 | 152 | 153 | ### Features ✨ 154 | 155 | * add the module-exists function ([#166](https://github.com/hbstack/hb/issues/166)) ([07c929b](https://github.com/hbstack/hb/commit/07c929b1db6fab0b37737bcbfb9c1dabbe21342b)) 156 | 157 | ## [0.10.0](https://github.com/hbstack/hb/compare/v0.9.2...v0.10.0) (2024-02-02) 158 | 159 | 160 | ### Features ✨ 161 | 162 | * override the _funcs/get-page-images partial to return the name of image and allow using site image resources ([#164](https://github.com/hbstack/hb/issues/164)) ([e5dc9cf](https://github.com/hbstack/hb/commit/e5dc9cf896b0b3880a39ef2aa5fa90371355311c)) 163 | 164 | ## [0.9.2](https://github.com/hbstack/hb/compare/v0.9.1...v0.9.2) (2024-01-25) 165 | 166 | 167 | ### Continuous Integration 168 | 169 | * add the hb/assets/css-resource partial ([#160](https://github.com/hbstack/hb/issues/160)) ([eed7546](https://github.com/hbstack/hb/commit/eed75468180c72df0906758808206944a51b432b)) 170 | 171 | ## [0.9.1](https://github.com/hbstack/hb/compare/v0.9.0...v0.9.1) (2024-01-24) 172 | 173 | 174 | ### Bug Fixes 175 | 176 | * avoid runtime error ([#159](https://github.com/hbstack/hb/issues/159)) ([f818087](https://github.com/hbstack/hb/commit/f818087bb63416cc45eb7da856cc49b82e2c4cc8)) 177 | * **deps:** update dependency stylelint-scss to v6.1.0 ([8397f01](https://github.com/hbstack/hb/commit/8397f010a5fa0475f7bf31f895b93744f2286224)) 178 | 179 | ## [0.9.0](https://github.com/hbstack/hb/compare/v0.8.1...v0.9.0) (2024-01-15) 180 | 181 | 182 | ### Features 183 | 184 | * add the hb.color parameter for setting default color mode, default to light ([#150](https://github.com/hbstack/hb/issues/150)) ([341239c](https://github.com/hbstack/hb/commit/341239c1a8798b544393762117ad819a49746701)) 185 | 186 | ## [0.8.1](https://github.com/hbstack/hb/compare/v0.8.0...v0.8.1) (2023-12-24) 187 | 188 | 189 | ### Bug Fixes 190 | 191 | * allow specifying default full width for specified page types ([#138](https://github.com/hbstack/hb/issues/138)) ([0fcc5bc](https://github.com/hbstack/hb/commit/0fcc5bc339486d29509d0146b59083fca0826135)) 192 | 193 | ## [0.8.0](https://github.com/hbstack/hb/compare/v0.7.2...v0.8.0) (2023-12-22) 194 | 195 | 196 | ### Features 197 | 198 | * add the hb.full_width parameter and page's full_width parameter ([#137](https://github.com/hbstack/hb/issues/137)) ([7c4cc7c](https://github.com/hbstack/hb/commit/7c4cc7cf5b6e33c66c82dabab9e235de4aa815b7)) 199 | 200 | 201 | ### Bug Fixes 202 | 203 | * **deps:** update dependency stylelint-scss to v5.3.1 ([86dc36d](https://github.com/hbstack/hb/commit/86dc36dacd527d9587f137b78a90e363b5d5a75b)) 204 | * **deps:** update dependency stylelint-scss to v6 ([04b8249](https://github.com/hbstack/hb/commit/04b824938cc48b2c73faaad0186ae4963c84e88b)) 205 | 206 | ## [0.7.2](https://github.com/hbstack/hb/compare/v0.7.1...v0.7.2) (2023-11-01) 207 | 208 | 209 | ### Bug Fixes 210 | 211 | * **deps:** update dependency stylelint-scss to v5.2.0 ([b0a651b](https://github.com/hbstack/hb/commit/b0a651b1f6e37013bd226f512f0008ef3e09b04d)) 212 | * **deps:** update dependency stylelint-scss to v5.2.1 ([6641368](https://github.com/hbstack/hb/commit/6641368ba69acf8edb6f922529ef1115b6e6b73a)) 213 | * **deps:** update dependency stylelint-scss to v5.3.0 ([c397431](https://github.com/hbstack/hb/commit/c39743112412d7622c9a0e2a2d3e7450beb1411c)) 214 | * **purgecss:** try to find the configuration file in subdirectories ([#108](https://github.com/hbstack/hb/issues/108)) ([1d7ddd3](https://github.com/hbstack/hb/commit/1d7ddd30f31240f6ab55b5fd6d8e2d08cacc194b)), closes [#106](https://github.com/hbstack/hb/issues/106) 215 | * **purgecss:** use process.env.HUGO_PUBLISHDIR instead of hard-coded public folder ([#107](https://github.com/hbstack/hb/issues/107)) ([c599450](https://github.com/hbstack/hb/commit/c599450f3fb9cd826d57eb1e4ad2c336168dc298)), closes [#105](https://github.com/hbstack/hb/issues/105) 216 | 217 | ## [0.7.1](https://github.com/hbstack/hb/compare/v0.7.0...v0.7.1) (2023-08-29) 218 | 219 | 220 | ### Bug Fixes 221 | 222 | * allow overriding Sass vars from modules ([0bfc09e](https://github.com/hbstack/hb/commit/0bfc09e43806867b58a83505fdfd85c9067aa94e)) 223 | 224 | ## [0.7.0](https://github.com/hbstack/hb/compare/v0.6.0...v0.7.0) (2023-08-25) 225 | 226 | 227 | ### Features 228 | 229 | * add the hb.styles.hb_top_offset parameter ([#68](https://github.com/hbstack/hb/issues/68)) ([eb242d3](https://github.com/hbstack/hb/commit/eb242d30e4b0a978df9c4e27fd3e28f7d80e086a)) 230 | 231 | ## [0.6.0](https://github.com/hbstack/hb/compare/v0.5.2...v0.6.0) (2023-08-25) 232 | 233 | 234 | ### Features 235 | 236 | * add the hb.styles parameter for defining Sass variables ([#66](https://github.com/hbstack/hb/issues/66)) ([a0b6dad](https://github.com/hbstack/hb/commit/a0b6dad482bec2afcde0570d6ca22c5e837f28aa)) 237 | * add the top offset mixin and CSS variable ([#67](https://github.com/hbstack/hb/issues/67)) ([45337f1](https://github.com/hbstack/hb/commit/45337f1d54c4627df4bfd90a6d1262602aeb323d)) 238 | 239 | 240 | ### Bug Fixes 241 | 242 | * **deps:** update dependency stylelint-scss to v5.1.0 ([486c8a7](https://github.com/hbstack/hb/commit/486c8a7b4352d1d7422b068d4a79a208fed033e5)) 243 | 244 | ## [0.5.2](https://github.com/hbstack/hb/compare/v0.5.1...v0.5.2) (2023-08-08) 245 | 246 | 247 | ### Bug Fixes 248 | 249 | * correct the css partial in the case of rendering alias pages ([d137e8b](https://github.com/hbstack/hb/commit/d137e8b73944f495570cf7189a0e3d2033dbf322)) 250 | * **deps:** update dependency stylelint-scss to v5.0.1 ([c0c576e](https://github.com/hbstack/hb/commit/c0c576e43ad44955fcd6898a97b7bd81e611cc58)) 251 | 252 | ## [0.5.1](https://github.com/hbstack/hb/compare/v0.5.0...v0.5.1) (2023-05-30) 253 | 254 | 255 | ### Bug Fixes 256 | 257 | * **deps:** update dependency stylelint-scss to v5 ([6ec9fa1](https://github.com/hbstack/hb/commit/6ec9fa181329df64d7b3f5bfc6b6ffd4277824b7)) 258 | --------------------------------------------------------------------------------