klink


Nameklink JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/pmorissette/klink
SummaryKlink is a simple and clean theme for creating Sphinx docs, inspired by jrnl
upload_time2024-05-21 13:31:23
maintainerNone
docs_urlNone
authorPhilippe Morissette
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: http://pmorissette.github.io/klink/_static/logo.png

.. image:: https://github.com/pmorissette/klink/workflows/Build%20Status/badge.svg
    :target: https://github.com/pmorissette/klink/actions/

.. image:: https://codecov.io/gh/pmorissette/klink/branch/master/graph/badge.svg
    :target: https://codecov.io/pmorissette/klink

.. image:: https://img.shields.io/pypi/v/klink
    :alt: PyPI
    :target: https://pypi.org/project/klink/

.. image:: https://img.shields.io/pypi/l/klink
    :alt: PyPI - License
    :target: https://pypi.org/project/klink/


klink - A Simple & Clean Sphinx Theme
=====================================

Klink is a **simple** and **clean** theme for creating `Sphinx docs
<http://sphinx-doc.org/>`__. It is heavily inspired by the beautiful `jrnl theme
<https://github.com/maebert/jrnl>`__. It also supports embedding `IPython
Notebooks <http://ipython.org/notebook.html>`__ which can be mighty useful.

For a live demo, please visit `our docs <http://pmorissette.github.io/klink/>`__.

Options
-------

Here are the theme options. They should be added to the html_theme_options in
your **conf.py** file.

* **github**
    The github address of the project. The format is name/project
    (pmorissette/klink).
* **logo**
    The logo file. Assumed to be in the _static dir. Default is logo.png. The logo
    should be 150x150.
* **analytics_id**
    Your Google Analytics id (usually starts with UA-...)

IPython Notebook Integration
----------------------------

With the klink helper function **convert_notebooks()**, all notebooks will be
converted to .rst so that they can be included in your docs. This includes all
output including images. It’s a very convenient way to create Python docs! 

All you have to do is create notebooks within your source directory (same directory
as your conf.py file). Then, you add a call to klink.convert_notebooks() in your
conf.py. You can also mix in **Mardown** cells or **Raw NBConvert** cells in
your workbook. These will be converted to rst as well. 

If you use the Raw NBConvert type cells, add a blank line at the start. There
seems to be a bug in the rst conversion and if the cell does not begin with a
blank line, you may run into some issues. 

Using a Raw NBConvert cell with rst text inside is convenient, especially if you
want to have links to other parts of your Sphinx docs. 

Installation
------------

Assuming you have pip installed:

.. code:: sh

    $ pip install klink

That's it.

Usage
-----

In your docs' **conf.py** file, add the following:

.. code:: python

    import klink

    html_theme = 'klink'
    html_theme_path = [klink.get_html_theme_path()]
    html_theme_options = {
        'github': 'yourname/yourrepo',
        'analytics_id': 'UA-your-number-here',
        'logo': 'logo.png'
    }

Klink also comes with a useful helper function that allows you to integrate an
IPython Notebook into a .rst file. It basically converts the Notebook to .rst
and copies the static data (images, etc) to your _static dir. 

If you have IPython Notebooks that you would like to integrate, use the
following code to your **conf.py**:

.. code:: python

    klink.convert_notebooks()

Once the conversion is done, you will have a .rst file with the same name as
each one of your notebooks.


*NOTE: Place your notebooks in your docs' source dir.*

Now all you have to do is use the **include** command to insert them into your
docs.


Customization
-------------

Obviously, some of you will want to customize the theme. The easiest way to
achieve this is to clone the repo into your _themes folder (create it if it does
not exist in your docs' source dir). To change the style, I recommend editing
the LESS files themselves. You will also need lessc to convert from less to css.
See the css command in the Makefile for an example. 

You may also want to explore the option of using **git subtree**. Here is a good
`intro tutorial <http://makingsoftware.wordpress.com/2013/02/16/using-git-subtrees-for-repository-separation/>`__.

You will also need to change your conf.py file. The following settings should
work::

    html_theme = 'klink'
    html_theme_path = ['_themes']
    html_theme_options = {
        'github': 'yourname/yourrepo',
        'analytics_id': 'UA-your-number-here',
        'logo': 'logo.png'
    }

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pmorissette/klink",
    "name": "klink",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Philippe Morissette",
    "author_email": "morissette.philippe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f7/f5/43820d1f3ce5248f14ed16ba9665064229b231ac07f26f76d1c07425b7e9/klink-0.1.10.tar.gz",
    "platform": null,
    "description": ".. image:: http://pmorissette.github.io/klink/_static/logo.png\n\n.. image:: https://github.com/pmorissette/klink/workflows/Build%20Status/badge.svg\n    :target: https://github.com/pmorissette/klink/actions/\n\n.. image:: https://codecov.io/gh/pmorissette/klink/branch/master/graph/badge.svg\n    :target: https://codecov.io/pmorissette/klink\n\n.. image:: https://img.shields.io/pypi/v/klink\n    :alt: PyPI\n    :target: https://pypi.org/project/klink/\n\n.. image:: https://img.shields.io/pypi/l/klink\n    :alt: PyPI - License\n    :target: https://pypi.org/project/klink/\n\n\nklink - A Simple & Clean Sphinx Theme\n=====================================\n\nKlink is a **simple** and **clean** theme for creating `Sphinx docs\n<http://sphinx-doc.org/>`__. It is heavily inspired by the beautiful `jrnl theme\n<https://github.com/maebert/jrnl>`__. It also supports embedding `IPython\nNotebooks <http://ipython.org/notebook.html>`__ which can be mighty useful.\n\nFor a live demo, please visit `our docs <http://pmorissette.github.io/klink/>`__.\n\nOptions\n-------\n\nHere are the theme options. They should be added to the html_theme_options in\nyour **conf.py** file.\n\n* **github**\n    The github address of the project. The format is name/project\n    (pmorissette/klink).\n* **logo**\n    The logo file. Assumed to be in the _static dir. Default is logo.png. The logo\n    should be 150x150.\n* **analytics_id**\n    Your Google Analytics id (usually starts with UA-...)\n\nIPython Notebook Integration\n----------------------------\n\nWith the klink helper function **convert_notebooks()**, all notebooks will be\nconverted to .rst so that they can be included in your docs. This includes all\noutput including images. It\u2019s a very convenient way to create Python docs! \n\nAll you have to do is create notebooks within your source directory (same directory\nas your conf.py file). Then, you add a call to klink.convert_notebooks() in your\nconf.py. You can also mix in **Mardown** cells or **Raw NBConvert** cells in\nyour workbook. These will be converted to rst as well. \n\nIf you use the Raw NBConvert type cells, add a blank line at the start. There\nseems to be a bug in the rst conversion and if the cell does not begin with a\nblank line, you may run into some issues. \n\nUsing a Raw NBConvert cell with rst text inside is convenient, especially if you\nwant to have links to other parts of your Sphinx docs. \n\nInstallation\n------------\n\nAssuming you have pip installed:\n\n.. code:: sh\n\n    $ pip install klink\n\nThat's it.\n\nUsage\n-----\n\nIn your docs' **conf.py** file, add the following:\n\n.. code:: python\n\n    import klink\n\n    html_theme = 'klink'\n    html_theme_path = [klink.get_html_theme_path()]\n    html_theme_options = {\n        'github': 'yourname/yourrepo',\n        'analytics_id': 'UA-your-number-here',\n        'logo': 'logo.png'\n    }\n\nKlink also comes with a useful helper function that allows you to integrate an\nIPython Notebook into a .rst file. It basically converts the Notebook to .rst\nand copies the static data (images, etc) to your _static dir. \n\nIf you have IPython Notebooks that you would like to integrate, use the\nfollowing code to your **conf.py**:\n\n.. code:: python\n\n    klink.convert_notebooks()\n\nOnce the conversion is done, you will have a .rst file with the same name as\neach one of your notebooks.\n\n\n*NOTE: Place your notebooks in your docs' source dir.*\n\nNow all you have to do is use the **include** command to insert them into your\ndocs.\n\n\nCustomization\n-------------\n\nObviously, some of you will want to customize the theme. The easiest way to\nachieve this is to clone the repo into your _themes folder (create it if it does\nnot exist in your docs' source dir). To change the style, I recommend editing\nthe LESS files themselves. You will also need lessc to convert from less to css.\nSee the css command in the Makefile for an example. \n\nYou may also want to explore the option of using **git subtree**. Here is a good\n`intro tutorial <http://makingsoftware.wordpress.com/2013/02/16/using-git-subtrees-for-repository-separation/>`__.\n\nYou will also need to change your conf.py file. The following settings should\nwork::\n\n    html_theme = 'klink'\n    html_theme_path = ['_themes']\n    html_theme_options = {\n        'github': 'yourname/yourrepo',\n        'analytics_id': 'UA-your-number-here',\n        'logo': 'logo.png'\n    }\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Klink is a simple and clean theme for creating Sphinx docs, inspired by jrnl",
    "version": "0.1.10",
    "project_urls": {
        "Homepage": "https://github.com/pmorissette/klink"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7f543820d1f3ce5248f14ed16ba9665064229b231ac07f26f76d1c07425b7e9",
                "md5": "e0ff0d85216edb8f369d772c34532e19",
                "sha256": "a8f56c449b3486ae602761e74663f8602acc4e0fdeb7bb88c354afecbde4c038"
            },
            "downloads": -1,
            "filename": "klink-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "e0ff0d85216edb8f369d772c34532e19",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 808062,
            "upload_time": "2024-05-21T13:31:23",
            "upload_time_iso_8601": "2024-05-21T13:31:23.741414Z",
            "url": "https://files.pythonhosted.org/packages/f7/f5/43820d1f3ce5248f14ed16ba9665064229b231ac07f26f76d1c07425b7e9/klink-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-21 13:31:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pmorissette",
    "github_project": "klink",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "klink"
}
        
Elapsed time: 0.87392s