diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c9da2c3..c6bc90d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,32 +1,49 @@ name: Deploy Documentation on: push: - branches: - - main # Set the branch you want to trigger the deployment + branches: [main] + pull_request: + branches: [main] jobs: - deploy: + build: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v5 - + with: + persist-credentials: false + - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.x' - + - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install nox - nox -s docs + run: pipx run nox -s docs + - name: Upload docs build as artifact + uses: actions/upload-pages-artifact@v4 + with: + name: ${{ github.event.repository.name }}_docs + path: ${{ github.workspace }}/site + + deploy: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: [build] + permissions: + # to deploy to Pages + pages: write + # to verify the deployment originates from an appropriate source + id-token: write + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + id: deployment + uses: actions/deploy-pages@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - commit_message: 'Deploy documentation' + artifact_name: ${{ github.event.repository.name }}_docs diff --git a/docs/getting-started.md b/docs/getting-started.md index 11c4416..fae91c6 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -4,11 +4,13 @@ Welcome to cpp-linter! This guide will help you integrate C/C++ linting into you ## Choose Your Integration + + Select the method that best fits your development workflow:
-- :material-github: **GitHub Actions** +- :material-github: **GitHub Actions** --- @@ -18,8 +20,7 @@ Select the method that best fits your development workflow: [Get started with GitHub Actions →](https://cpp-linter.github.io/cpp-linter-action/){ .md-button .md-button--primary } - -- :material-git: **Pre-commit Hooks** +- :material-git: **Pre-commit Hooks** --- @@ -28,9 +29,8 @@ Select the method that best fits your development workflow: **Perfect for:** Catching issues before commits, local enforcement [Get started with pre-commit →](https://github.com/cpp-linter/cpp-linter-hooks){ .md-button .md-button--primary } - -- :fontawesome-brands-python: **Command Line** +- :fontawesome-brands-python: **Command Line** --- @@ -40,7 +40,7 @@ Select the method that best fits your development workflow: [Get started with cpp-linter package →](https://cpp-linter.github.io/cpp-linter/){ .md-button .md-button--primary } -- :simple-rust: **Command Line (Rust)** +- :simple-rust: **Command Line (Rust)** --- @@ -56,7 +56,7 @@ Select the method that best fits your development workflow:
-- :fontawesome-brands-github: **clang-tools-static-binaries** +- :fontawesome-brands-github: **clang-tools-static-binaries** --- @@ -64,8 +64,7 @@ Select the method that best fits your development workflow: [Download from →](https://github.com/cpp-linter/clang-tools-static-binaries){ .md-button .md-button--primary } - -- :fontawesome-brands-docker: **clang-tools-docker** +- :fontawesome-brands-docker: **clang-tools-docker** --- @@ -73,8 +72,7 @@ Select the method that best fits your development workflow: [Download from →](https://github.com/cpp-linter/clang-tools-docker){ .md-button .md-button--primary } - -- :fontawesome-brands-python: **clang-tools-wheels** +- :fontawesome-brands-python: **clang-tools-wheels** --- @@ -84,13 +82,11 @@ Select the method that best fits your development workflow:
- - ## Easy Installation
-- :fontawesome-brands-python: **clang-tools-pip** +- :fontawesome-brands-python: **clang-tools-pip** --- @@ -98,7 +94,7 @@ Select the method that best fits your development workflow: [Get started with clang-tools CLI →](https://cpp-linter.github.io/clang-tools-pip/){ .md-button .md-button--primary } -- :fontawesome-brands-python: **clang-tools-asdf** +- :fontawesome-brands-python: **clang-tools-asdf** --- diff --git a/docs/index.md b/docs/index.md index caa8e2a..11f2840 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,39 +2,31 @@ hide: - navigation - toc +template: home.html +title: C/C++ Linting --- -
+ -# C/C++ linting that simply works - -**Lint your C/C++ code in workflow** - automated, configurable, and reliable. Integrate seamlessly into any workflow in minutes. - -[Get started :material-rocket-launch:](getting-started.md){ .md-button .md-button--primary } - -
- -
- -
+# C/C++ Linting ## Everything you need for linting C/C++ code
-- :material-chart-line: **Built in Open Source** +- :material-chart-line: **Built in Open Source** --- Open-source and MIT-licensed. Bringing contributors together to empower impactful C/C++ lint projects in open source and beyond. -- :material-cog: **Zero Configuration** +- :material-cog: **Zero Configuration** --- Works out of the box with sensible defaults. Advanced users can customize every aspect to match their coding standards. -- :material-devices: **Works Everywhere** +- :material-devices: **Works Everywhere** --- @@ -138,7 +130,15 @@ hide: - id: clang-format args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit. - id: clang-tidy - args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*'] + args: + - --checks='boost-* + - bugprone-* + - performance-* + - readability-* + - portability-* + - modernize-* + - clang-analyzer-* + - cppcoreguidelines-*' ``` === "Command Line" diff --git a/docs/overrides/home.html b/docs/overrides/home.html new file mode 100644 index 0000000..525278f --- /dev/null +++ b/docs/overrides/home.html @@ -0,0 +1,20 @@ +{% extends "main.html" %} + +{% block hero %} +
+

C/C++ linting that simply works

+

+ Lint your C/C++ code in your development workflow + - automated, configurable, and reliable. + Integrate seamlessly into any development workflow in minutes. +

+

+ + Get started + + + + +

+
+{% endblock %} diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 6d9cb81..d6c1b22 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -2,16 +2,17 @@ th { background-color: var(--md-default-fg-color--lightest); } +:root > * { + --cpp-linter-logo-color-green: #40b385; + --cpp-linter-logo-color-yellow: #ffc20a; +} + /* Hero section styling */ .hero { text-align: center; padding: 4rem 0; - background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%); - background-size: 200% 200%; - animation: gradientShift 8s ease infinite; - color: white; - margin: -1.5rem -1.5rem 3rem -1.5rem; - border-radius: 0 0 1rem 1rem; + background: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); } .hero h1 { @@ -19,17 +20,44 @@ th { font-weight: 700; margin-bottom: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); + text-align: center; + color: unset; } .hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; - max-width: 600px; + width: 65%; margin-left: auto; margin-right: auto; } +.hero .twemoji { + --md-icon-size: 1.125em; + display: inline-flex; + height: var(--md-icon-size); + vertical-align: text-top; +} + +.hero .md-button { + background: var(--cpp-linter-logo-color-green); + color: black; + border: none; + border-radius: unset; + display: inline-block; +} + +.hero .md-button:hover { + background: var(--cpp-linter-logo-color-yellow); + color: black; + border: none; +} + +.md-typeset .md-button:hover { + color: black; +} + @keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } @@ -184,19 +212,6 @@ th { } } -.md-header { - background-color: #4051b5; -} - -/* Make navigation tabs match header color */ -.md-tabs { - background-color: #4051b5; -} - -.md-tabs__list { - background-color: #4051b5; -} - /* Ensure tab items have proper contrast */ .md-tabs__item { background-color: transparent; diff --git a/mkdocs.yml b/mkdocs.yml index 1d7a8e8..0eaf710 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: "cpp-linter" site_description: "Documentation for the cpp-linter organization." site_url: "https://cpp-linter.github.io/" repo_url: https://github.com/cpp-linter - +repo_name: "cpp-linter" copyright: "© 2021-2025, cpp-linter" nav: @@ -11,11 +11,15 @@ nav: - Discussion: discussion.md # - Blog: # - blog/index.md +exclude_docs: | + blog/** theme: name: material + custom_dir: docs/overrides features: - navigation.tabs + - navigation.tabs.sticky - toc.integrate - navigation.top - navigation.sections @@ -35,7 +39,7 @@ theme: # Palette toggle for light mode - media: "(prefers-color-scheme: light)" scheme: default - primary: blue + primary: indigo accent: cyan toggle: icon: material/lightbulb-outline @@ -44,7 +48,7 @@ theme: # Palette toggle for dark mode - media: "(prefers-color-scheme: dark)" scheme: slate - primary: blue + primary: indigo accent: cyan toggle: icon: material/lightbulb