diff --git a/.github/cspell.json b/.github/cspell.json new file mode 100644 index 0000000000..0c872cb3c3 --- /dev/null +++ b/.github/cspell.json @@ -0,0 +1,109 @@ +{ + "version": "0.2", + "language": "en", + "caseSensitive": false, + "words": [ + "CakePHP", + "VitePress", + "php", + "datetime", + "varchar", + "postgresql", + "mysql", + "sqlite", + "webroot", + "csrf", + "xss", + "cakephp", + "bake", + "phinx", + "hasher", + "middlewares", + "namespaced", + "phpunit", + "composable", + "autowiring", + "stringable", + "arrayable", + "timestampable", + "paginator", + "Enqueue", + "dequeue", + "nullable", + "accessor", + "mutator", + "minphpversion", + "phpversion", + "XAMPP", + "WAMP", + "MAMP", + "controllername", + "actionname", + "Datamapper", + "webservices", + "nginx", + "apache", + "httpd", + "lighttpd", + "mbstring", + "simplexml", + "Laragon", + "composer", + "phar", + "paginate", + "startup", + "endfor", + "endwhile", + "sidebar", + "blocks", + "rewrite", + "before", + "called", + "sites", + "example", + "Classes", + "Redirect", + "Layout" + ], + "ignoreRegExpList": [ + "\\$[a-zA-Z_][a-zA-Z0-9_]*", + "[a-zA-Z]+::[a-zA-Z]+", + "<[^>]+>", + "`[^`]+`", + "```[\\s\\S]*?```", + "\\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\\b", + "\\b[a-z]+_[a-z_]+\\b", + "\\bhttps?:\\/\\/[^\\s]+", + "\\[[a-z]\\][a-z]+", + "\\b[A-Z][a-z]+\\b", + "\\b(true|false|null|while|for|if|else)\\b" + ], + "languageSettings": [ + { + "languageId": "*", + "locale": "en", + "dictionaries": ["en", "softwareTerms", "php"] + }, + { + "languageId": "*", + "locale": "ja", + "allowCompoundWords": true + } + ], + "overrides": [ + { + "filename": "**/docs/ja/**/*.md", + "language": "ja", + "ignoreRegExpList": [ + "[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]+" + ] + } + ], + "ignorePaths": [ + "node_modules/**", + ".temp/**", + "dist/**", + "**/*.min.js", + "**/*.lock" + ] +} diff --git a/.github/markdownlint.json b/.github/markdownlint.json new file mode 100644 index 0000000000..4327587dbf --- /dev/null +++ b/.github/markdownlint.json @@ -0,0 +1,50 @@ +{ + "default": true, + "heading-increment": false, + "no-hard-tabs": false, + "no-multiple-blanks": false, + "line-length": false, + "commands-show-output": false, + "blanks-around-headings": false, + "no-duplicate-heading": false, + "single-h1": false, + "no-trailing-punctuation": false, + "no-blanks-blockquote": false, + "list-marker-space": false, + "blanks-around-fences": false, + "blanks-around-lists": false, + "no-inline-html": { + "allowed_elements": [ + "Badge", + "div", + "span", + "br", + "style", + "details", + "summary", + "table", + "thead", + "tbody", + "tr", + "th", + "td", + "img", + "a", + "svg", + "path", + "figure", + "p" + ] + }, + "no-bare-urls": false, + "fenced-code-language": false, + "first-line-heading": false, + "code-block-style": false, + "single-trailing-newline": false, + "link-fragments": false, + "table-pipe-style": false, + "table-column-count": false, + "emphasis-style": false, + "table-column-style": false, + "descriptive-link-text": false +} diff --git a/.github/workflows/docs-validation.yml b/.github/workflows/docs-validation.yml new file mode 100644 index 0000000000..a995ef186d --- /dev/null +++ b/.github/workflows/docs-validation.yml @@ -0,0 +1,69 @@ +name: Documentation Validation + +on: + pull_request: + paths: + - 'docs/**' + - '.github/**' + - 'toc_*.json' + - 'config.js' + +jobs: + js-lint: + name: Validate JavaScript Files + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Validate config.js syntax + run: node --check config.js + + json-lint: + name: Validate JSON Files + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Validate JSON syntax + run: | + for file in toc_*.json; do + if ! jq empty "$file" 2>/dev/null; then + echo "Invalid JSON: $file" + exit 1 + fi + echo "✅ Valid: $file" + done + + markdown-lint: + name: Lint Markdown + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Lint markdown files + uses: articulate/actions-markdownlint@v1 + with: + config: .github/markdownlint.json + files: 'docs/**/*.md' + ignore: 'node_modules' + + spell-check: + name: Spell Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Check spelling + uses: streetsidesoftware/cspell-action@v5 + with: + files: 'docs/**/*.md' + config: '.github/cspell.json' + incremental_files_only: true