Skip to content
Merged
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
1 change: 1 addition & 0 deletions cspell.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ words:
- Cachy
- cppcoreguidelines
- fontawesome
- htmltitle
- hustcer
- imgproxy
- inlinehilite
Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: clang-format and clang-tidy GitHub Action
description: Run clang-format and clang-tidy on the C/C++ files a pull request changes, with annotations, review suggestions and a thread comment.
---

[file-annotations]: inputs-outputs.md#file-annotations
[thread-comments]: inputs-outputs.md#thread-comments
[step-summary]: inputs-outputs.md#step-summary
Expand Down
14 changes: 14 additions & 0 deletions docs/overrides/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "main.html" %}

{#-
Gives the 404 page a title of its own, so that missing pages are not counted
under the home page's title in Google Analytics.
-#}

{% block htmltitle %}
<title>Page not found - {{ config.site_name }}</title>
{% endblock %}

{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
30 changes: 30 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% extends "base.html" %}

{#-
Visits from the maintainers are tagged so that the Internal Traffic data
filter in Google Analytics can drop them. These docs share the
cpp-linter.github.io origin with the organization site, which sets the flag:
opening any page there or here with ?internal=1 stores it in localStorage and
?internal=0 removes it. While it is there, every event carries
traffic_type=internal. It runs before Material's own snippet, so the setting
is queued ahead of the first page_view.
-#}

{% block analytics %}
{% if config.extra.analytics %}
<script>
try {
var param = new URLSearchParams(location.search).get("internal");
if (param === "1") localStorage.setItem("cpp-linter-internal", "1");
if (param === "0") localStorage.removeItem("cpp-linter-internal");
if (localStorage.getItem("cpp-linter-internal") === "1") {
window.dataLayer = window.dataLayer || [];
(function () { dataLayer.push(arguments); })("set", { traffic_type: "internal" });
}
} catch (e) {
// localStorage is unavailable when storage is blocked; the visit is then not tagged.
}
</script>
{% endif %}
{{ super() }}
{% endblock %}
9 changes: 9 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ site_url: "https://cpp-linter.github.io/cpp-linter-action"
repo_url: "https://github.com/cpp-linter/cpp-linter-action"
repo_name: "cpp-linter/cpp-linter-action"
edit_uri: "edit/main/docs/"
# Theme overrides live in docs/ but are not pages.
exclude_docs: |
overrides/
nav:
- index.md
- inputs-outputs.md
Expand All @@ -16,6 +19,7 @@ nav:

theme:
name: material
custom_dir: docs/overrides
features:
- navigation.top
- content.tabs.link
Expand Down Expand Up @@ -65,6 +69,11 @@ extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/cpp-linter/cpp-linter
# The same Google Analytics property as cpp-linter.github.io and the other
# cpp-linter docs, which all share that origin.
analytics:
provider: google
property: G-JKH4SXC7HC

extra_css:
- https://cpp-linter.github.io/stylesheets/shared.css
Expand Down
Loading