GithubHelp home page GithubHelp logo

mdn / sphinx-theme Goto Github PK

View Code? Open in Web Editor NEW
28.0 21.0 10.0 357 KB

(Deprecated) Make Sphinx docs look like MDN

License: Mozilla Public License 2.0

Python 11.15% HTML 82.03% Makefile 6.83%
python sphinx-theme sphinx readthedocs sphinx-doc

sphinx-theme's Introduction

Mozilla Developer Network Sphinx Theme

Warning: This theme is broken, and won't be fixed. For details, see: bug 1361729

This is a version of the Mozilla Developer Network theme, for the Sphinx documentation engine. It was used for the Kuma development documentation.

Here is how I use it

To use it, you need to clone it somewhere in your Sphinx's architecture:

$ pip install mdn-sphinx-theme

and to configure Sphinx to use it. In your conf.py file:

import mdn_theme

html_theme_path = [mdn_theme.get_theme_dir()]
html_theme = 'mdn'

Take care and remove the pygments_style configuration, as it may not be of the better taste with the mozilla's theme.

Any contributions are of course welcome!

Readthedocs

Add a pip requirements file to your project and have the following packages listed there:

Sphinx
mdn-sphinx-theme

Then configure your Readthedocs project to use that requirement file before rendering your project's documentation.

sphinx-theme's People

Contributors

groovecoder avatar jezdez avatar jwhitlock avatar lmorchard avatar openjck avatar stephaniehobson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sphinx-theme's Issues

No syntax highlighting

After trying the MDN theme on https://github.com/jwhitlock/web-platform-compat, I lost syntax highlighting of Python, HTTP headers and JSON. Syntax highlighting is important for readability of API documentation.

I tried the following in my conf.py:

# pygments_style == disabled
pygments_style = 'sphinx'
pygments_style = 'mdn'  # failure on doc build

Relative links to mozorg.cdn.mozilla.net fail on local docs

The theme adds this link to the <head>:

<link href="//mozorg.cdn.mozilla.net/media/css/tabzilla-min.css" rel="stylesheet" type="text/css">

This fails when viewing docs from the local filesystem. One fix would be to use https:// like the other includes:

<link href="https://mozorg.cdn.mozilla.net/media/css/tabzilla-min.css" rel="stylesheet" type="text/css">

There is a similar issue with tabzilla.js.

TypeError in wiki.js

When trying the style on https://github.com/jwhitlock/web-platform-compat, I got the following error on installation.html:

TypeError: undefined is not an object (evaluating $maincontent.offset().left)

The error is at line 320, position 86 of wiki.js, which does not appear to be part of this project. This could be related to #5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.