From 5f5337f75d58c384743952ec0eb2ea910ba59cf5 Mon Sep 17 00:00:00 2001 From: kascit Date: Mon, 11 May 2026 14:19:18 +0530 Subject: [PATCH] fixes: trust, unsafe inline css, etc --- .codespellrc | 2 +- .editorconfig | 21 ++ .github/CODEOWNERS | 1 + .github/FUNDING.yml | 1 + .github/ISSUE_TEMPLATE/bug_report.yml | 24 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 23 ++ .github/PULL_REQUEST_TEMPLATE.md | 19 ++ .github/workflows/linter.yml | 4 +- .github/workflows/sync-data.yml | 6 +- .jscpd.json | 5 +- .markdownlint.json | 4 + .prettierignore | 8 +- .stylelintignore | 4 + .vscode/settings.json | 1 + CITATION.cff | 8 + CODE_OF_CONDUCT.md | 7 + CONTRIBUTING.md | 14 ++ SECURITY.md | 12 +- SUPPORT.md | 7 + config.toml | 6 +- content/about.md | 12 +- content/archive/_index.md | 1 + content/design/_index.md | 25 +- content/links/_index.md | 12 - content/privacy.md | 2 +- data/projects.json | 201 ++------------- data/taxonomy-rules.json | 60 ++--- src/components/_cards.css | 45 +++- src/dui.css | 10 +- src/layout/_navigation.css | 17 +- src/layout/_sidebar.css | 22 +- src/pages/_landing.css | 57 +++-- src/responsive-display.css | 24 +- src/theme-system.css | 50 ++-- static/css/dui.css | 2 +- static/css/font-awesome.subset.css | 10 - static/css/main.css | 2 +- static/giallo-dark.css | 265 ++++++++++++++++++++ static/giallo-light.css | 265 ++++++++++++++++++++ static/js/core/boot.js | 257 ++----------------- static/js/core/bootstrap-utils.js | 81 ++++++ static/js/core/main.js | 102 ++------ static/js/core/resource-loader.js | 3 +- static/js/core/shell.js | 6 +- static/js/data/blog-feed.js | 3 + static/js/data/taxonomy-playlist.js | 7 +- static/js/data/taxonomy-subscribe.js | 9 +- static/js/features/access-keys.js | 31 ++- static/js/features/search-loader.js | 133 +++++++--- static/js/shell.min.js | 10 +- static/js/system/auth-integration.js | 9 +- static/js/system/service-worker.js | 4 +- static/js/ui/code-blocks.js | 11 + static/js/ui/drawer.js | 2 +- static/js/ui/notify-banner.js | 40 ++- static/rss.xsl | 125 +++++++++ templates/archive.html | 4 +- templates/base.html | 26 +- templates/landing.html | 20 +- templates/macros/apps.html | 14 +- templates/macros/article_meta.html | 4 +- templates/macros/content_footer.html | 22 +- templates/macros/head.html | 114 ++++----- templates/macros/header.html | 21 +- templates/macros/landing_sections.html | 24 +- templates/macros/notify_banner.html | 17 +- templates/macros/post_card.html | 4 +- templates/macros/projects.html | 6 +- templates/macros/runtime.html | 13 +- templates/macros/search.html | 12 +- templates/macros/seo.html | 17 +- templates/macros/sidebar.html | 52 ++-- templates/macros/sidebar_helpers.html | 12 + templates/macros/utils.html | 8 +- templates/navbar_export.html | 2 +- templates/page.html | 25 +- templates/project.html | 18 +- templates/rss.xml | 8 +- templates/section.html | 10 +- templates/shell-chrome.html | 10 +- templates/shortcodes/projects_grid.html | 4 +- templates/shortcodes/tag_chip.html | 2 +- templates/status.html | 18 +- tools/cloudflare/csp-meta-handoff-worker.js | 38 ++- 84 files changed, 1583 insertions(+), 1034 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/CODEOWNERS create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .markdownlint.json create mode 100644 .stylelintignore create mode 100644 CITATION.cff create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 SUPPORT.md create mode 100644 static/giallo-dark.css create mode 100644 static/giallo-light.css create mode 100644 static/js/core/bootstrap-utils.js create mode 100644 static/rss.xsl diff --git a/.codespellrc b/.codespellrc index 942dd75..c47731a 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,3 @@ [codespell] ignore-words-list = doubleclick,te,ue -skip = *.min.js,public,static/js/shell.min.js +skip = *.min.js,public,static/js/shell.min.js,static/css/dui.css,static/css/main.css,tools/cloudflare/* diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d40e8c7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +# Disable strict IDE formatting on vendored, built, and third-party files +[static/css/{dui,main}.css] +indent_style = unset +insert_final_newline = unset +trim_trailing_whitespace = unset + +[tools/cloudflare/**.js] +indent_style = unset diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..835bbc1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @kascit diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..d2b9727 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: kascit diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..717be21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,24 @@ +name: Bug Report +description: Create a report to help us improve +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: How can we reproduce this bug? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..d59187d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature Request +description: Suggest an idea for this project +title: "[Feature]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to suggest a feature! + - type: textarea + id: feature-description + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..30babd9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +# Pull Request + +## Description + +## Motivation and Context + +## Types of changes + +- [ ] Bugfix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Documentation update + +## Checklist + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. +- [ ] I have read the **CONTRIBUTING** document. diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b5680d8..10fb37d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,4 +1,3 @@ ---- name: Lint & Quality on: @@ -50,7 +49,8 @@ jobs: VALIDATE_CSS_PRETTIER: false VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false - FILTER_REGEX_EXCLUDE: .*public/.*|.*scratch/.*|.*static/js/vendor/.*|.*templates/.*|.*data/.*|.*\.min\.js + # Unified exclusion regex covering public, scratch, templates, data, vendor assets, third-party CSS, and tools. + FILTER_REGEX_EXCLUDE: .*public/.*|.*scratch/.*|.*static/js/vendor/.*|.*static/css/(dui|main)\.css|.*tools/cloudflare/.*|.*templates/.*|.*data/.*|.*\.min\.js GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} quality: diff --git a/.github/workflows/sync-data.yml b/.github/workflows/sync-data.yml index 40d4298..edf84e8 100644 --- a/.github/workflows/sync-data.yml +++ b/.github/workflows/sync-data.yml @@ -1,7 +1,7 @@ name: Data Sync on: schedule: - - cron: '0 0 * * 0' # Run weekly on Sunday at midnight UTC + - cron: "0 0 * * 0" # Run weekly on Sunday at midnight UTC workflow_dispatch: # Allow manual trigger permissions: @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: "20" - name: Run GitHub Data Sync env: diff --git a/.jscpd.json b/.jscpd.json index fd369fa..76a5827 100644 --- a/.jscpd.json +++ b/.jscpd.json @@ -5,6 +5,9 @@ "public/**", "resources/**", "static/fuse.min.js", - "static/elasticlunr.min.js" + "static/elasticlunr.min.js", + "static/css/dui.css", + "static/css/main.css", + "tools/cloudflare/**" ] } diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..0809466 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,4 @@ +{ + "default": true, + "MD034": false +} diff --git a/.prettierignore b/.prettierignore index a77154c..885bf08 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,7 @@ # Ignore Tera/Zola templates - formatter breaks the syntax templates/ -*.html -content/about.md -static/css/main.css + +# Ignore vendor, built, and external tool scripts static/css/dui.css -static/js/shell.min.js \ No newline at end of file +static/css/main.css +tools/cloudflare/ diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..3fe5ed6 --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,4 @@ +# Ignore vendor and compiled stylesheets +static/css/dui.css +static/css/main.css +public/ diff --git a/.vscode/settings.json b/.vscode/settings.json index e6eac11..07e7b40 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,7 @@ "yaml.validate": false, "cSpell.words": [ "Baeldung", + "Codolio", "daisyui", "Dhanur", "dotenv", diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..5e422eb --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,8 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: + - family-names: "Relhan" + given-names: "Dhanur" +title: "kascit.github.io" +version: 1.0.0 +url: "https://dhanur.me" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4947899 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,7 @@ +# Code of Conduct + +As this is a personal project, the core guideline is simple: **Be respectful and professional.** + +Any harassment, abusive language, or inappropriate behavior in issues or pull requests will result in an immediate ban from the repository. + +Please report any unacceptable behavior to [contact@dhanur.me](mailto:contact@dhanur.me). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..08b4319 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing to kascit.github.io + +Thank you for your interest in contributing! Since this is my personal site and portfolio, contributions are generally limited to typo fixes, bug reports, and accessibility improvements. + +## Pull Requests + +- Please ensure that you have run `just dev` to verify your changes locally. +- Keep PRs focused on a single issue. +- Describe the changes clearly in the PR template. + +## Code Standards + +- Use the provided `just` commands to build and format code. +- Ensure all tests pass. diff --git a/SECURITY.md b/SECURITY.md index 54b78f2..0b96578 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,18 +2,18 @@ ## Supported Versions -| Version | Supported | -| ------- | --------- | -| Latest (`main`) | ✅ | -| Older deploys | ❌ | +| Version | Supported | +| --------------- | --------- | +| Latest (`main`) | ✅ | +| Older deploys | ❌ | ## Reporting a Vulnerability -If you discover a security vulnerability in this project, **please do not open a public issue.** +Please report any suspected or confirmed security vulnerabilities privately to **[security@dhanur.me](mailto:security@dhanur.me)**. Please do not open a public issue. Instead, report it privately: -1. **Email:** [contact@dhanur.me](mailto:[contact@dhanur.me]) +1. **Email:** [security@dhanur.me](mailto:security@dhanur.me) 2. **Subject line:** `[SECURITY] kascit.github.io — ` ### What to include diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..d96fb6c --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,7 @@ +# Support + +If you need help or have questions regarding this repository, please: + +1. Check the [Issues](https://github.com/kascit/kascit.github.io/issues) page to see if your question has been answered. +2. If it's a security vulnerability, please refer to [SECURITY.md](SECURITY.md) and email `contact@dhanur.me`. +3. For general inquiries, you can reach out via the contact form on my site. diff --git a/config.toml b/config.toml index 66d85bb..1d40189 100644 --- a/config.toml +++ b/config.toml @@ -14,7 +14,7 @@ default_language = "en" # BUILD & OUTPUT # ============================================================================= compile_sass = true # Required by Zola theme -minify_html = true # Always enable in production +minify_html = false # Disabled to preserve strict HTML5 closures and quoted attributes build_search_index = true # Required for site search generate_feeds = true @@ -53,7 +53,7 @@ external_links_target_blank = true external_links_no_referrer = true # Security best practice [markdown.highlighting] -style = "inline" # Latest Zola-compatible highlighting without generated giallo source files +style = "class" # Map syntax to CSS variables instead of bloated inline rules light_theme = "github-light" dark_theme = "github-dark" @@ -84,7 +84,7 @@ default_thumbnail = "images/thumbs/default_thumbnail.jpg" # Analytics (leave empty to disable cleanly) gtag = "G-BY8SPYYYYR" -ahrefs_analytics_key = "zpZ3KAfSjE0wBbf1DHDY0w" +ahrefs_analytics_key = "$AHREFS_KEY" # GitHub edit link (used by theme templates) edit_url = "https://github.com/kascit/kascit.github.io/edit/main" diff --git a/content/about.md b/content/about.md index 80419c1..2a02607 100644 --- a/content/about.md +++ b/content/about.md @@ -36,28 +36,28 @@ Most days look like APIs, infra, and architecture decisions. Nights are for AI e