Skip to content

consiglionazionaledellericerche/docs-cnr-theme

 
 

Join the #design channel Get invited

Docs Italia theme

This is the official theme for any piece of documentation hosted on the upcoming Docs Italia.

How to use Sphinx Italia on your documentation

  • Add the following line to your documentation requirements.txt file:

    $ pip install git+https://github.com/italia/docs-cnr-theme.git
    
  • In your conf.py file, you'll need to specify the theme as follows:

    # Add this line at the top of the file within the "import" section
    import docs_cnr_theme
    
    # Add the Sphinx extension 'docs_cnr_theme' in the extensions list
    extensions = [
      ...,
      'docs_cnr_theme'
    ]
    
    # Edit these lines
    html_theme = "docs_cnr_theme"
    html_theme_path = [docs_cnr_theme.get_html_theme_path()]
    

Contributing or modifying the theme

  • Clone the repository:

    git clone git+https://github.com/italia/docs-cnr-theme.git
    
  • If needed, install Sphinx into a virtual environment:

    pip install sphinx
    
  • If needed, install SASS:

    gem install sass
    
  1. Install node.js and grunt:

    // Install node on OS X
    brew install node
    
    // Install grunt
    npm install -g grunt-cli
    
    // Now that everything is installed, let's install the theme dependecies.
    npm install
    
  2. Run the main script to load a sample docs with the Sphinx Italia theme applied:

    npm start
    

    This will compile static assets and watch files required for the theme to reload at runtime.

TODO: building a release, handling versioning system to enable automatic update on Docs Italia platform

About

Tema per i documenti pubblicati su Docs Italia

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 29.0%
  • SCSS 28.8%
  • HTML 25.6%
  • Python 13.8%
  • Makefile 2.8%