Skip to content

New documentation system#4050

Merged
mathjazz merged 35 commits into
mozilla:mainfrom
mathjazz:2214-new-docs
Apr 3, 2026
Merged

New documentation system#4050
mathjazz merged 35 commits into
mozilla:mainfrom
mathjazz:2214-new-docs

Conversation

@mathjazz

@mathjazz mathjazz commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Fix #2214.

Please check it out at:
https://pontoon.allizom.org/docs/

@mathjazz mathjazz force-pushed the 2214-new-docs branch 4 times, most recently from 3df2809 to 3674706 Compare March 31, 2026 18:10

@eemeli eemeli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A brief review of the rendered site -- didn't look at the code at all, and ignoring the content completely:

  • The "On this page" right-hand column is a bit useless on the four top-level pages, and makes the page feel a bit cramped, esp. as each of those has two-column section links in the main body. Those four pages could instead use a layout that left out that column and used it for main content.
  • The highlight colour for search results could be a bit bolder in dark mode.
  • The header font width changing when you scroll down is a bit odd, in particular on the front page where the page & site titles are the same.
  • The header repo link could use a GitHub logo rather than a generic repo logo, the same as the one in the footer.

@flodolo flodolo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a commit with a bunch of fixes (content, links).

In general, there's a significant problem: to change something I need to rebuild the whole Docker image. This seems to work locally?

.gitignore requires changes nonetheless.

diff --git a/.gitignore b/.gitignore
index 78f625ecd..ed96f9de5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,8 +19,7 @@ tmp/
 venv/
 
 /docker/config/server.env
-/docs/_build
-/docs/_gh-pages
+/documentation/site/
 /env/
 /media/
 /pontoon/coverage.xml
diff --git a/docker-compose.yml b/docker-compose.yml
index f0731a4bb..a6675d49f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -18,6 +18,7 @@ services:
       - ./pontoon:/app/pontoon
       - ./requirements:/app/requirements
       - ./translate:/app/translate
+      - ./documentation:/app/documentation
       - ~/.ssh:/home/pontoon/.ssh
 
   # Database
diff --git a/pontoon/urls.py b/pontoon/urls.py
index f95a1675b..3638cffbb 100644
--- a/pontoon/urls.py
+++ b/pontoon/urls.py
@@ -19,9 +19,11 @@ def docs_serve(request, path="index.html"):
     if not path or path.endswith("/"):
         path = f"{path}index.html"
 
-    return serve(
-        request, path, document_root=os.path.join(settings.STATIC_ROOT, "docs")
-    )
+    docs_dir = os.path.join(settings.ROOT, "documentation", "site")
+    if not os.path.isdir(docs_dir):
+        docs_dir = os.path.join(settings.STATIC_ROOT, "docs")
+
+    return serve(request, path, document_root=docs_dir)
 
 
 register_converter(LocaleConverter, "locale")


## Adding a new project to Pontoon

When accessing your deployed app, your email address is your login in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove this section and link to https://pontoon.allizom.org/docs/admin/adding-new-project/ (instead of linking at the end)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good idea.

Comment thread documentation/docs/admin/adding-new-project.md Outdated
@mathjazz

mathjazz commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator Author
The "On this page" right-hand column is a bit useless on the four top-level pages, and makes the page feel a bit cramped, esp. as each of those has two-column section links in the main body. Those four pages could instead use a layout that left out that column and used it for main content.

Agreed regarding the uselessness of the On this page section on these sites. There's no per-page option to turn that off, but we can hide them with CSS. I'd keep the width of the main content column unchanged - wide content blocks are harder to read.

The highlight colour for search results could be a bit bolder in dark mode.

We use the default color. I'll update to the latest version of the theme, which changed the UI a bit. Let's see if that helps.

The header font width changing when you scroll down is a bit odd, in particular on the front page where the page & site titles are the same.

Agreed. Let's fix that.

The header repo link could use a GitHub logo rather than a generic repo logo, the same as the one in the footer.

That's the default icon and it looks the same on Material for mkdocs, so people might be familiar with.

@flodolo

flodolo commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

We need to update the Help link

href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/"

@mathjazz

mathjazz commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator Author

I pushed a commit with a bunch of fixes (content, links).

Thank you!

In general, there's a significant problem: to change something I need to rebuild the whole Docker image. This seems to work locally?

Yeah, I am aware of this and planning to fix it before we merge. Your approach works. I was trying to avoid having docs in two separate paths (and the need to change urls.py). I'll look into it again.

@mathjazz

mathjazz commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator Author

We need to update the Help link

href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/"

Yup, there's plenty of places that need update like this, already on it.

@flodolo

flodolo commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

I'm going to push a change with updates to docs that landed in
mozilla-l10n/documentation#329
mozilla-l10n/localizer-documentation#295

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.00%. Comparing base (91be114) to head (ec2fb6f).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@flodolo

flodolo commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

I wonder if it's worth adding a .vscode/settings.json file to exclude some folders from search? It's still not automated, but you can exclude them in one click.

{
  "search.exclude": {
    "**/.git": true,
    "**/node_modules": true,
    "**/documentation/.cache": true
  }
}
Screenshot 2026-04-03 alle 08 11 19

@mathjazz mathjazz merged commit 8f9a608 into mozilla:main Apr 3, 2026
9 checks passed
@mathjazz mathjazz deleted the 2214-new-docs branch April 3, 2026 17:01
functionzz pushed a commit that referenced this pull request Apr 23, 2026
Adds the new documentation site accessbile at /docs and built by Zensical. It consolidates Pontoon documentation from three previously separate sites:

* [Developer docs](https://mozilla-pontoon.readthedocs.io/en/latest/)
* [Localizer docs](https://mozilla-l10n.github.io/localizer-documentation/)
* [Admin docs](https://mozilla-l10n.github.io/documentation/)

---------

Co-authored-by: Francesco Lodolo <flod@lodolo.net>
functionzz pushed a commit to functionzz/pontoon that referenced this pull request May 4, 2026
Adds the new documentation site accessbile at /docs and built by Zensical. It consolidates Pontoon documentation from three previously separate sites:

* [Developer docs](https://mozilla-pontoon.readthedocs.io/en/latest/)
* [Localizer docs](https://mozilla-l10n.github.io/localizer-documentation/)
* [Admin docs](https://mozilla-l10n.github.io/documentation/)

---------

Co-authored-by: Francesco Lodolo <flod@lodolo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rebuild Pontoon's documentation

4 participants