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
44 changes: 0 additions & 44 deletions .github/workflows/deploy-docs.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Deploy docs to GitHub Pages

on:
push:
branches: [parity-deploy]
workflow_dispatch:
workflow_call: # invoked by sync-upstream.yml after a clean auto-sync

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment; let an in-progress run finish rather than
# cancelling it (a half-published Pages deploy is worse than a queued one).
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: parity-deploy # always build the deploy branch tip (correct for push, dispatch, and workflow_call)
fetch-depth: 0 # full history for git-revision-date-localized under --strict

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install imaging libs (social cards)
run: |
sudo apt-get update
sudo apt-get install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf-2.0-0 libffi-dev

- name: Cache Material social cards
uses: actions/cache@v4
with:
key: mkdocs-material-${{ github.run_id }}
restore-keys: mkdocs-material-
path: .cache

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

- name: Build site
run: mkdocs build --strict -d site

- name: Generate client-side redirect stubs (GH Pages has no server-side 301s)
run: python scripts/gen_redirects.py --site-dir site --redirects redirects.json

# Custom domain is opt-in: set the repo variable CUSTOM_DOMAIN
# (e.g. docs.polkadot.com) to publish under it. Left unset, the site
# deploys to the *.github.io URL — useful for testing without claiming
# the production domain.
- name: Set custom domain
if: vars.CUSTOM_DOMAIN != ''
run: echo "${{ vars.CUSTOM_DOMAIN }}" > site/CNAME

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
76 changes: 76 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Sync from upstream

# Keeps the deployment branch (parity-deploy) up to date with the upstream
# content repo (polkadot-developers/polkadot-docs).
#
# - Clean merge -> push parity-deploy and deploy automatically (no review).
# - Conflict -> open a PR so the clash with the deploy-specific changes
# gets resolved by a human (the merge then deploys).
# - No changes -> do nothing.

on:
schedule:
- cron: '0 5 * * *' # daily, 05:00 UTC
workflow_dispatch:

permissions:
contents: write
pull-requests: write
pages: write
id-token: write

jobs:
sync:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.merge.outputs.result }}
env:
GH_TOKEN: ${{ github.token }}
UPSTREAM: https://github.com/polkadot-developers/polkadot-docs.git
steps:
- name: Checkout deploy branch
uses: actions/checkout@v4
with:
ref: parity-deploy
fetch-depth: 0

- name: Merge upstream
id: merge
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add upstream "$UPSTREAM"
git fetch --quiet upstream master

if git merge-base --is-ancestor upstream/master HEAD; then
echo "Already up to date with upstream."
echo "result=noop" >> "$GITHUB_OUTPUT"
exit 0
fi

if git merge --no-edit upstream/master; then
# Clean merge: publish directly. The deploy is handled by the
# deploy job below (a GITHUB_TOKEN push would not trigger it).
git push origin parity-deploy
echo "result=clean" >> "$GITHUB_OUTPUT"
else
# Conflict with the deploy-specific changes: hand off via a PR.
git merge --abort
branch="sync/upstream-$(date -u +%Y%m%d)"
git switch -c "$branch"
git merge --no-edit upstream/master || true
git add -A
git commit --no-edit -m "Merge upstream/master (CONFLICTS — resolve before merging)"
git push -f origin "$branch"
gh pr create \
--base parity-deploy --head "$branch" \
--title "Sync from upstream — conflicts to resolve ($(date -u +%Y-%m-%d))" \
--body "Automated upstream sync hit conflicts with the deploy-specific changes. Resolve the conflicts and merge to publish; merging triggers a deploy." \
|| echo "A PR for this branch may already exist."
echo "result=conflict" >> "$GITHUB_OUTPUT"
fi

deploy:
needs: sync
if: needs.sync.outputs.result == 'clean'
uses: ./.github/workflows/deploy-pages.yml
3 changes: 1 addition & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
with:
fetch-depth: 0

- name: Sync canonical Vale rules from the PaperMoon styleguide
run: ./.github/scripts/sync-styleguide-vale.sh
# Vale rules are vendored in styles/PaperMoon/ (committed) — no sync needed.

- name: List changed markdown files
id: changed
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ scripts/__pycache__/*
# MkDocs social cards
.cache/

# Vale rules and vocab synced from papermoonio/documentation-style-guide
styles/PaperMoon/
styles/config/vocabularies/PaperMoon/
# Vale rules and the PaperMoon vocab are VENDORED (committed) into
# styles/PaperMoon/ and styles/config/vocabularies/PaperMoon/ so linting is
# self-contained. Refresh from upstream with sync-styleguide-vale.sh.

# Claude
.claude/scheduled_tasks.lock
9 changes: 5 additions & 4 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ MinAlertLevel = suggestion
Vocab = PaperMoon, Polkadot

# Vale rules and the PaperMoon vocab in styles/PaperMoon/ and
# styles/config/vocabularies/PaperMoon/ are synced from the canonical
# papermoonio/documentation-style-guide repo and are gitignored.
# Run `./.github/scripts/sync-styleguide-vale.sh` before linting locally;
# CI runs the script automatically (see .github/workflows/vale.yml).
# styles/config/vocabularies/PaperMoon/ are VENDORED (committed) in this repo,
# so linting is self-contained — no external fetch at lint time.
# Originally from papermoonio/documentation-style-guide (BSD 2-Clause, see
# styles/PaperMoon/LICENSE). To refresh from upstream, run
# ./.github/scripts/sync-styleguide-vale.sh then commit the result.
#
# To also lint against Google's style, run `vale sync` after adding:
# Packages = Google
Expand Down
1 change: 1 addition & 0 deletions docs/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ nav:
- 'Technical Reference': reference
- 'AI Resources': ai-resources.md
- 'Support': get-support.md
- 'Policies': policies
18 changes: 0 additions & 18 deletions docs/js/ai-file-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,6 @@
}
}

// ---------- Analytics ----------

function sendAnalytics(actionId) {
if (typeof window.gtag === 'function') {
try {
window.gtag('event', 'ai_file_action', {
event_category: 'engagement',
event_label: actionId,
});
} catch (e) {
/* silently fail */
}
}
}

// ---------- Clipboard / Download Logic ----------

async function copyToClipboard(text) {
Expand Down Expand Up @@ -164,7 +149,6 @@
const copyBtn = event.target.closest('.ai-file-actions-copy');
if (copyBtn) {
event.preventDefault();
sendAnalytics(copyBtn.dataset.action || 'copy-markdown');
handleCopy(copyBtn);
return;
}
Expand All @@ -175,8 +159,6 @@
// Close the dropdown
closeDropdown(item.closest('.ai-file-actions-menu'));

sendAnalytics(item.dataset.actionId || '');

// Download links: intercept to force download via fetch+blob
// On re-entry from handleDownload's .click(), the flag is set
// so we skip preventDefault() and let the browser download the blob natively
Expand Down
3 changes: 3 additions & 0 deletions docs/policies/.nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nav:
- 'Terms of Use': terms-of-use.md
- 'AI Chatbot Policy': ai-chatbot-policy.md
8 changes: 8 additions & 0 deletions docs/policies/ai-chatbot-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: AI Chatbot Policy
description: This AI chatbot policy outlines the terms, conditions, and guidelines you agree to when accessing or using the AI chatbot provided through this Website.
hide:
- feedback
---

--8<-- 'https://raw.githubusercontent.com/w3f/polkadot-wiki/refs/heads/master/docs/policies/chatbot-terms.md:5'
22 changes: 22 additions & 0 deletions docs/policies/terms-of-use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Terms of Use
description: The terms, disclaimer, and privacy information governing use of the Polkadot developer documentation website.
hide:
- feedback
---

# Terms of Use

This website provides primarily static, informational content about the Polkadot network, and is provided "as is" and "as available" without warranties of any kind, either express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. Any interactive tools or utilities made available on this website (including network/wallet configuration buttons and address or key conversion utilities) are provided for convenience only, are used entirely at your own risk, and do not constitute a recommendation to transact or any financial, investment, or legal advice.

We do not use cookies (although your browser's local storage may be used to remember basic preferences such as light/dark theme), collect personal data, or provide financial or legal advice. Certain technical data may be automatically collected by your internet service provider or web browser. This is beyond our control. This website embeds certain third-party resources (including an AI chatbot widget and a JavaScript content delivery network), which may receive your IP address and, in the case of the chatbot, any information you choose to submit to it. Use of the AI chatbot is governed by our separate [AI Chatbot Policy](/policies/ai-chatbot-policy/).

Links to third-party sites are for reference only, do not imply endorsement, we have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party websites.

This website is hosted via GitHub Pages that logs visitor IP addresses when a Pages site is visited (IPs are stored for security purposes, regardless of whether the visitor is signed in).

These terms are governed by the laws of England and Wales. By using this website, you agree to these terms.

For enquiries, contact: [info@parity.io](mailto:info@parity.io)

© 2026 Parity Technologies Limited, registered in England and Wales (no 09760015) with its registered office at 1 Sans Walk, London, EC1R 0LT. Documentation content is maintained by the community and may be subject to separate copyright (see repository).
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
41 changes: 41 additions & 0 deletions material-overrides/assets/stylesheets/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* Self-hosted DM Sans (variable weight) — replaces the Google Fonts CDN load.
Vendored from @fontsource-variable/dm-sans (woff2 in ../fonts/dm-sans/).
Keeps visitor IP off fonts.googleapis.com / fonts.gstatic.com (GDPR).
DM Sans is the only web font actually used by the theme (body text via
--md-text-font). Headers fall back to system serif as before. */

/* latin */
@font-face {
font-family: "DM Sans";
font-style: normal;
font-display: swap;
font-weight: 100 1000;
src: url("../fonts/dm-sans/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "DM Sans";
font-style: italic;
font-display: swap;
font-weight: 100 1000;
src: url("../fonts/dm-sans/dm-sans-latin-wght-italic.woff2") format("woff2-variations");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
font-family: "DM Sans";
font-style: normal;
font-display: swap;
font-weight: 100 1000;
src: url("../fonts/dm-sans/dm-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "DM Sans";
font-style: italic;
font-display: swap;
font-weight: 100 1000;
src: url("../fonts/dm-sans/dm-sans-latin-ext-wght-italic.woff2") format("woff2-variations");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
10 changes: 0 additions & 10 deletions material-overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
<link rel="stylesheet" href="{{ 'assets/stylesheets/polkadot.css' | url }}">
{% endblock %}

{% block fonts %}
{#-
Add Google Fonts here
-#}
{{ super() }}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Hammersmith+One&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
{% endblock%}

{% block site_meta %}
{{ super() }}
{% if page and page.meta and page.meta.keywords %}
Expand Down
Loading
Loading