Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slick slider in Docs #69

Open
thclark opened this issue Sep 4, 2019 · 0 comments
Open

Add slick slider in Docs #69

thclark opened this issue Sep 4, 2019 · 0 comments
Labels
devops System admin and devops documentation Improvements or additions to documentation

Comments

@thclark
Copy link
Contributor

thclark commented Sep 4, 2019

We could add a slick slider to the docs, allowing multiple images to be displayed in the banner.

To do this we can adapt the sphinx hello world tutorial...

In docs/source/_ext/slickslider.py :

from docutils import nodes
from docutils.parsers.rst import Directive


class SlickSlider(Directive):

    def run(self):
        paragraph_node = nodes.paragraph(text='Slick Slider!')
        return [paragraph_node]


def setup(app):
    app.add_directive("slickslider", SlickSlider)

    return {
        'version': '0.1',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }

Line 18 of docs/source/conf.py might look like:

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath("./_ext"))

Line 34 of conf.py might look like:

    'sphinx_tabs.tabs',
    'sphinx.ext.mathjax',
    'sphinx.ext.ifconfig',
    'slickslider',
    'breathe',
    'exhale'
]

And index.rst might look like:


EnvironmentSTUDIO flow (**es-flow** for short) is a library for analysing and modeling atmospheric and marine boundary layers.

.. slickslider::

@thclark thclark added devops System admin and devops documentation Improvements or additions to documentation labels Sep 4, 2019
@thclark thclark removed this from Octue Board Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops System admin and devops documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant