Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.go]
indent_style = tab

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ resources/

# Node.js dependencies
node_modules/
package-lock.json

# Hugo build artifacts
public/
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
exampleSite/public
exampleSite/resources
public
resources
.hugo_build.lock
flake.lock
package-lock.json
*.min.js
*.min.css
static/bibtex
13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"overrides": [
{ "files": "*.md", "options": { "printWidth": 80, "proseWrap": "preserve" } },
{ "files": "*.html", "options": { "parser": "html" } }
]
}
5 changes: 5 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
exampleSite/public
public
resources
**/*.min.css
9 changes: 9 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "stylelint-config-standard",
"rules": {
"declaration-no-important": [true, { "severity": "warning" }],
"custom-property-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"selector-class-pattern": null,
"no-descending-specificity": null
}
}
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from '@eslint/js';
import globals from 'globals';

export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2023,
sourceType: 'module',
globals: { ...globals.browser, ...globals.node },
},
rules: {
'prefer-const': 'warn',
'no-var': 'warn',
eqeqeq: ['warn', 'smart'],
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
},
},
{
files: ['scripts/**/*.js'],
languageOptions: { sourceType: 'commonjs' },
},
{ ignores: ['node_modules', 'exampleSite/public', 'public', 'resources', '**/*.min.js'] },
];
24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,33 @@
"private": true,
"scripts": {
"build": "hugo --gc --minify",
"build:advanced": "npm run build && npm run optimize-images && npm run seo-audit",
"dev": "hugo server --disableFastRender --navigateToChanged",
"optimize-images": "node scripts/optimize-images.js",
"seo-audit": "node scripts/seo-audit.js",
"validate-seo": "node scripts/validate-seo.js"
"lint": "eslint assets/js scripts && stylelint 'assets/css/**/*.css'",
"lint:fix": "eslint --fix assets/js scripts && stylelint --fix 'assets/css/**/*.css'",
"format": "prettier --write 'assets/**/*.{js,css,md}' 'layouts/**/*.html' 'scripts/**/*.js' '**/*.md'",
"format:check": "prettier --check 'assets/**/*.{js,css,md}' 'layouts/**/*.html' 'scripts/**/*.js' '**/*.md'"
},
"devDependencies": {
"sharp": "^0.34.0",
"@eslint/js": "^9.0.0",
"autoprefixer": "^10.4.0",
"cheerio": "^1.0.0",
"eslint": "^9.0.0",
"globals": "^15.0.0",
"glob": "^11.0.0",
"cheerio": "^1.0.0"
"postcss": "^8.4.0",
"postcss-preset-env": "^9.5.0",
"prettier": "^3.2.0",
"sharp": "^0.34.0",
"stylelint": "^16.0.0",
"stylelint-config-standard": "^36.0.0"
},
"engines": {
"node": ">=18.17.0"
"node": ">=20.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/your-username/pkb-theme"
"url": "https://github.com/stradichenko/PKB-theme"
},
"keywords": [
"hugo",
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
autoprefixer: {},
'postcss-preset-env': { stage: 2 },
},
};