Skip to content

Commit 77951eb

Browse files
authored
Merge pull request #737 from gethinode/develop
Develop
2 parents 6a3a793 + d638e20 commit 77951eb

File tree

16 files changed

+13377
-5701
lines changed

16 files changed

+13377
-5701
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
matrix:
4444
os: [macos-latest, windows-latest, ubuntu-latest]
4545
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
46-
node-version: [20.x, 22.x]
46+
node-version: [22.x, 24.x]
4747

4848
runs-on: ${{ matrix.os }}
4949

@@ -75,10 +75,11 @@ jobs:
7575
shell: bash
7676

7777
# [24/AUG/23] Adjusted from npm ci for non-macOS to prevent EBADPLATFORM error due to fsevents
78+
# [25/NOV/25] Adjusted to npm i for all platforms due to lock issues
7879
- name: Perform clean install of npm
7980
run: |
8081
if [ "$RUNNER_OS" == "macOS" ]; then
81-
npm ci
82+
npm i
8283
else
8384
npm i
8485
fi

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
HUSKY: 0
10+
11+
permissions:
12+
contents: read # for checkout
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write # to be able to publish a GitHub release
20+
issues: write # to be able to comment on released issues
21+
pull-requests: write # to be able to comment on released pull requests
22+
id-token: write # to enable use of OIDC for npm provenance
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: "lts/*"
34+
35+
- name: Install dependencies
36+
run: npm clean-install
37+
38+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
39+
run: npm audit signatures
40+
41+
- name: Release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: npx semantic-release

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.husky/install.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Skip Husky install in production and CI
2+
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
3+
process.exit(0)
4+
}
5+
const husky = (await import('husky')).default
6+
console.log(husky())

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

CLAUDE.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is the documentation site for Hinode, a Hugo theme based on Bootstrap 5. The site is published to https://gethinode.com and deployed via Netlify.
8+
9+
## Common Commands
10+
11+
### Development
12+
13+
```bash
14+
npm start # Start dev server with live reload (auto-vendors modules)
15+
npm run start:prod # Start server in production mode with minification
16+
```
17+
18+
### Building
19+
20+
```bash
21+
npm run build # Production build with minification (auto-cleans public/)
22+
npm run build:cache # CI build with cache optimizations
23+
npm run build:debug # Debug build with verbose output (auto-updates modules)
24+
npm run build:preview # Preview build with drafts and future posts
25+
npm run build:headers # Generate Netlify headers and server config
26+
```
27+
28+
### Linting
29+
30+
```bash
31+
npm test # Run all lints (alias for lint:markdown)
32+
npm run lint # Run all lints
33+
npm run lint:markdown # Lint markdown files
34+
npm run lint:markdown-fix # Auto-fix markdown issues
35+
npm run lint:scripts # Lint JavaScript with ESLint (neostandard)
36+
npm run lint:styles # Lint SCSS files with Stylelint
37+
```
38+
39+
### Hugo Modules
40+
41+
```bash
42+
npm run mod:update # Update all modules, vendor, and tidy
43+
npm run mod:vendor # Vendor Hugo modules to _vendor/
44+
npm run mod:tidy # Clean up go.sum
45+
npm run mod:clean # Clean Hugo module cache
46+
```
47+
48+
### Utilities
49+
50+
```bash
51+
npm run clean:public # Remove public/ directory
52+
npm run clean:install # Remove package-lock.json and node_modules
53+
npm run upgrade # Upgrade npm dependencies and Hugo modules
54+
npm run env # Display Hugo environment info
55+
npm run check # Display Hugo version
56+
```
57+
58+
## Architecture
59+
60+
### Hugo Module System
61+
62+
- Main theme imported from `github.com/gethinode/hinode`
63+
- Additional modules in `go.mod` provide features like FontAwesome, Mermaid, KaTeX, FlexSearch
64+
- Vendored modules stored in `_vendor/` directory
65+
- Module mounts defined in `config/_default/hugo.toml`
66+
67+
### Configuration Structure
68+
69+
- `config/_default/` - Default configuration files
70+
- `hugo.toml` - Main Hugo config
71+
- `params.toml` - Site parameters
72+
- `languages.toml` - Language settings
73+
- `markup.toml` - Markdown rendering options
74+
- `menus/` - Navigation menus
75+
- `config/production/` - Production overrides
76+
- `config/ci/` - CI environment config
77+
78+
### Content Organization
79+
80+
- `content/en/` - English content
81+
- `docs/latest/` - Current documentation (mounted to `/docs/`)
82+
- `guides/` - Tutorial guides
83+
- Content uses Hugo page bundles with front matter
84+
85+
### Asset Pipeline
86+
87+
- SCSS in `assets/scss/` processed with Dart Sass (via Netlify plugin)
88+
- JavaScript in `assets/js/`
89+
- PostCSS with autoprefixer, cssnano, and PurgeCSS
90+
- Build stats written to `hugo_stats.json` for PurgeCSS
91+
92+
### Layouts
93+
94+
Custom layouts in `layouts/` override theme templates. The site uses Hugo's template inheritance from the Hinode theme.
95+
96+
## Release Workflow
97+
98+
The project uses automated releases with semantic versioning:
99+
100+
### Commit Conventions
101+
102+
- Follows [Conventional Commits](https://www.conventionalcommits.org/) specification
103+
- Enforced via commitlint with `@commitlint/config-conventional`
104+
- Commit format: `type(scope): description`
105+
- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `build`, `ci`
106+
- Example: `feat(docs): add new search functionality`
107+
108+
### Git Hooks (Husky)
109+
110+
Husky manages Git hooks to ensure code quality:
111+
112+
- **pre-commit**: Runs `npm test` (markdown linting)
113+
- **commit-msg**: Validates commit messages with commitlint
114+
- Hooks are skipped in CI and production environments
115+
116+
### Semantic Release
117+
118+
Automated versioning and releases on the `main` branch:
119+
120+
- **Trigger**: Pushes to `main` or manual workflow dispatch
121+
- **Process**:
122+
1. Analyzes commits since last release
123+
2. Determines version bump (major/minor/patch)
124+
3. Generates release notes
125+
4. Creates GitHub release
126+
5. Updates `package.json` and `package-lock.json`
127+
- **Plugins**:
128+
- `@semantic-release/commit-analyzer` - Determines version bump
129+
- `@semantic-release/release-notes-generator` - Generates changelog
130+
- `@semantic-release/github` - Creates GitHub releases
131+
- `@semantic-release/git` - Commits version updates
132+
- **Workflow**: `.github/release.yml`
133+
134+
## Key Files
135+
136+
### Core Configuration
137+
138+
- `netlify.toml` - Netlify deployment configuration
139+
- `go.mod` / `go.sum` - Hugo module dependencies
140+
- `package.json` - npm scripts and dependencies
141+
- `config/_default/hugo.toml` - Main Hugo configuration
142+
143+
### Linting Configuration
144+
145+
- `.markdownlint-cli2.jsonc` - Markdown linting rules
146+
- Disabled rules: MD013 (line length), MD024 (duplicate headings), MD026 (trailing punctuation), MD034 (bare URLs), MD053 (link definitions), MD055 (table pipe alignment), MD056 (table column count)
147+
- Ignores: `node_modules`, `CHANGELOG.md`
148+
- `eslint.config.js` - JavaScript linting with neostandard preset
149+
- Stylelint uses `stylelint-config-standard-scss` (configured in package.json)
150+
151+
### Release & Git Hooks
152+
153+
- `commitlint.config.js` - Conventional commits configuration
154+
- `.husky/commit-msg` - Commit message validation hook
155+
- `.husky/pre-commit` - Pre-commit linting hook
156+
- `.github/release.yml` - Semantic release workflow

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']}

config/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const purgecss = purgeCSSPlugin({
2929
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_table.scss',
3030
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_video.scss',
3131
'./_vendor/github.com/gethinode/hinode/assets/scss/theme/fonts.scss',
32+
'./_vendor/github.com/gethinode/hinode/component-library/components/list/list.scss',
3233
'./_vendor/github.com/gethinode/mod-cookieyes/v2/assets/scss/cookieyes.scss',
3334
'./_vendor/github.com/gethinode/mod-flexsearch/v3/assets/scss/modules/flexsearch/flexsearch.scss',
3435
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
_schema: default
3+
title: List
4+
description: Use the list content block to show a list of articles.
5+
icon: fas list
6+
modules: ["simple-datatables"]
7+
---
8+
9+
## Overview
10+
11+
The `list` content block renders a list of articles. Add the following configuration to your page's frontmatter to enable data table features:
12+
13+
```yml
14+
---
15+
modules: ["simple-datatables"]
16+
---
17+
```
18+
19+
<!-- markdownlint-disable MD037 -->
20+
{{< example-bookshop lang="bookshop" >}}
21+
22+
```yml
23+
- _bookshop_name: list
24+
heading:
25+
title: Available Content Blocks
26+
align: start
27+
input:
28+
section: content-blocks
29+
reverse: false
30+
sort: title
31+
hide-empty: false
32+
background:
33+
color: primary
34+
subtle: true
35+
justify: start
36+
sortable: true
37+
paginate: true
38+
searchable: true
39+
```
40+
41+
{{< /example-bookshop >}}
42+
<!-- markdownlint-enable MD037 -->
43+
44+
## Arguments
45+
46+
The content block supports the following arguments:
47+
48+
{{< args bookshop-list >}}

content/en/docs/latest/content/tables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ modules: ["simple-datatables"]
271271
---
272272
```
273273

274-
As an example, the following shortcode displays a responsive table that is `searchable`, is `sortable`, and enables `paging` with a page size (`pagingOptionPerPage`) of 5.
274+
As an example, the following shortcode displays a responsive table that is `searchable`, is `sortable`, and enables paging (`paginate`) with a page size (`pagination`) of 5.
275275

276276
<!-- markdownlint-disable MD037 MD058 -->
277277
{{< example lang="markdown" >}}
278-
{{</* table sortable="true" paging="true" searchable="true" pagingOptionPerPage=5 */>}}
278+
{{</* table sortable="true" paginate="true" searchable="true" pagination=5 */>}}
279279
| # | Heading |
280280
|-----|---------|
281281
| 1. | Item 1 |

0 commit comments

Comments
 (0)