Closed Bug 920314 Opened 12 years ago Closed 8 years ago

Publish mozilla-central sphinx docs with MDN theme

Categories

(developer.mozilla.org Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gps, Unassigned)

References

Details

(Whiteboard: [type:feature])

Attachments

(1 file)

In bug 917988 we added Sphinx documentation to mozilla-central. Files at https://hg.mozilla.org/mozilla-central/file/default/build/docs. Generated site at http://build-docs.paas.allizom.org/. It's already using the Sphinx MDN theme. I believe the MDN people want to aggregate all external docs on MDN. So, filing a bug to track getting this new doc source integrated.
Whiteboard: [type:feature]
A few things, with an eye toward getting this hooked up with MDN: We've been focusing initially on docs that use readthedocs.org as the build-and-host service (bug 877197) and temporarily using mod_proxy to "host" those docs at MDN URLs (bug 882927) until we can offer our own generic Sphinx build service (bug 882919). That said, you've already got docs building on the PAAS. So, you may or may not care about Read the Docs, if your current solution works for you. If we could get all the IT stars to align, we could set up some sort of scheduled transfer (eg. rsync in a cronjob?) that just plonks your built docs into a directory on our servers. Long story short, what can we do that works well for you & your process to get your docs served up from an MDN URL?
Whiteboard: [type:feature]
Whiteboard: [type:feature]
I'd prefer to not have the MDN publishing relying on my personal PAAS service. I could probably set up a job on https://jenkins.mozilla.org/ that invokes Sphinx and makes a tarball (or similar) available. Then someone could install a CRON on MDN to sync things over. Would that work?
IMO ReadTheDocs is ideal - the better we can refine that process the more projects we can bring into the fold.
ReadTheDocs wants a setup.py in the root directory of mozilla-central. I'm unwilling to create said file because it will only serve to cause confusion. We have enough problems with Python in m-c as it is. I don't want to pile on. Is the tarball on ci.mozilla.org sufficient?
+jezdez - any idea if we can get around the setup.py file requirement for mozilla-central to hit ReadTheDocs?
New home for the generated docs is: https://ci.mozilla.org/job/mozilla-central-docs/Tree_Documentation/ https://ci.mozilla.org/job/mozilla-central-docs/lastSuccessfulBuild/artifact/tree-docs.tar.gz This reflects changes in bug 939367 that allow any part of the tree to have its docs aggregated by Sphinx. It's quite possible in-tree docs writing might explode because of this new feature. Is there an ETA on the mdn-sphinx-theme Python package upgrading to the hot new MDN theme?
No ETA, sorry. Current priority is improving performance on the new theme first. :)
Depends on: 987332
Depends on: 1115278
https://gecko.readthedocs.org/ is now a thing. Per comment #1, I guess this means we're only a single mod_proxy rule away from exposing docs on MDN. Although, we'd need a working MDN Sphinx theme, which I don't believe has been working for about a year (since the MDN theme refresh).
Note: I sent https://github.com/mozilla/kuma/pull/2981 to update the sphinx-template-generator for the new MDN design. Once that's merged, I can work with :lorchard to make a new MDN sphinx template release.
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/3a88bf3e5fba9046eed70a0e4cfd6971ff77255a fix bug 920314 - tweak template & css for sphinx https://github.com/mozilla/kuma/commit/2a89af779afac31c5e639010b58dc3ab7d50a499 Merge pull request #2981 from groovecoder/update-sphinx-template-920314 fix bug 920314 - tweak template & css for sphinx
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
needinfo? for myself and :jezdez to pair on the PyPI release of the theme
Status: RESOLVED → REOPENED
Flags: needinfo?(lcrouch)
Flags: needinfo?(jezdez)
Resolution: FIXED → ---
https://pypi.python.org/pypi/mdn-sphinx-theme is updated and ready to use. :gps - you should be able to set your theme to this new mdn theme now.
Assignee: nobody → gps
Flags: needinfo?(jezdez)
Summary: Publish mozilla-central sphinx docs on MDN → Publish mozilla-central sphinx docs with MDN theme
The MDN theme works again, let's use it.
When using the new theme, some things aren't rendering too well. Please apply the patch against mozilla-central, run |./mach build-docs| and take a look in objdir/docs/html/ for the output. Notably: * Definition lists have no formatting, making them very difficult to read * Pages like build/buildsystem/mozbuild-symbols.html are much harder to read on MDN compared to RTD. * Spacing generally feels off. * The TOC doesn't have indentation It feels like we're missing CSS rules or something. But I didn't see any 404s from my network panel. I didn't dig too deeply, however. I think an MDN guru should have a look and assess whether this is a Sphinx theme bug or MDN lacking styling bug.
Sorry, I've never worked with mozilla-central. :/ Can you point me at an article that explains how to "apply the patch against mozilla-central, run ./mach build-docs" ?
Flags: needinfo?(gps)
$ hg clone https://hg.mozilla.org/mozilla-central $ cd mozilla-central $ hg import --exact https://bug920314.bugzilla.mozilla.org/attachment.cgi?id=8544707 $ hg up tip $ ./mach build-docs
Flags: needinfo?(gps)
Thanks Gregory. I was able to build and see it locally. I'm going to needinfo? either :openjck or :shobson to take a look when they can. :openjck, :shobson - you can use Gregory's steps in Comment 18 to build the mozilla-central docs with the MDN sphinx theme. Though if you change the last step to: ./mach build-docs docs-with-mdn-theme Then it's a little easier to open at: open docs-with-mdn-theme/docs/html/index.html If you get a chance, can one of you take a quick look and estimate whether the theme needs markup changes, or if we just need to add some more CSS styles to sphinx.styl?
Flags: needinfo?(shobson)
Flags: needinfo?(jkarahalis)
Grr ... that open line should be: open docs-with-mdn-theme/html/index.html (i.e., take out the extra "docs" directory I put between theme/ and /html/)
(In reply to Gregory Szorc [:gps] from comment #16) > When using the new theme, some things aren't rendering too well. Please > apply the patch against mozilla-central, run |./mach build-docs| and take a > look in objdir/docs/html/ for the output. > > Notably: > > * Definition lists have no formatting, making them very difficult to read > * Pages like build/buildsystem/mozbuild-symbols.html are much harder to read > on MDN compared to RTD. These issues can be corrected by adding the class "text content" to the element #wiki-content. > * Spacing generally feels off. Hm. Is there anything in particular that feels off? We do use more/different page elements in our production documentation, so that might have something to do with it. The spacing looks similar to me when compared to a normal page [1] with the sidebar hidden. > * The TOC doesn't have indentation RTD uses different classes to indicate TOC hierarchy. The TOC looks as it should with this rule added: #toc li:not(.toctree-l1) { display: none; } More styling would be needed to handle the case where sub-menus /should/ be shown. > It feels like we're missing CSS rules or something. But I didn't see any > 404s from my network panel. I didn't dig too deeply, however. > > I think an MDN guru should have a look and assess whether this is a Sphinx > theme bug or MDN lacking styling bug. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/border-image
Flags: needinfo?(jkarahalis)
Correction: The class should be "text-content" not "text content".
I'm not actively working on this.
Assignee: gps → nobody
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 11 years ago9 years ago
Flags: needinfo?(shobson)
Resolution: --- → FIXED
Hi Stephanie, you closed this bug as FIXED, does it mean the in-tree docs are now automatically pushed to MDN?
Flags: needinfo?(shobson)
Sorry, didn't mean to mark as fixed, just wanted to remove the needs info for myself.
Status: RESOLVED → REOPENED
Flags: needinfo?(shobson)
Resolution: FIXED → ---
We're deprecating the MDN Sphinx theme (bug 1361729), so you may want to look at other theme options for these documents. I'm -1 on this approach for integrating docs into MDN. They look like MDN docs, because they have the same header, footer, and style. Unlike MDN-native docs, they won't be integrated into site search, and won't be available for macro processing, translation, or live editing. I think it adds confusion rather than meets user needs. A larger cross-team discussion is needed if we're going to build an all-in-one documentation site, starting with "why" rather than "how".
Then I guess there isn't a future for this bug then.
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: