{ "info": { "author": "Mounir Messelmeni", "author_email": "messelmeni.mounir@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "============================\nWelcome to django-highlightjs\n============================\n\n.. image:: https://travis-ci.org/MounirMesselmeni/django-highlightjs.png?branch=master\n :target: https://travis-ci.org/MounirMesselmeni/django-highlightjs\n\n.. image:: https://coveralls.io/repos/MounirMesselmeni/django-highlightjs/badge.png?branch=master\n :target: https://coveralls.io/r/MounirMesselmeni/django-highlightjs?branch=master\n\n\n.. image:: https://pypip.in/version/django-highlightjs/badge.svg\n :target: https://pypi.python.org/pypi/django-highlightjs/\n :alt: Latest Version\n\n\nUse Highlight.js (https://highlightjs.org) in your Django templates, the Django way.\n\n\nInstallation\n------------\n\n1. Install using pip:\n\n ``pip install django-highlightjs``\n\n Alternatively, you can install download or clone this repo and call ``pip install -e .``.\n\n2. Add to INSTALLED_APPS in your ``settings.py``:\n\n ``'highlightjs',``\n\n3. In your templates, load the ``highlightjs`` library and use the ``highlightjs_*`` tags:\n\nSettings\n--------\n\nThe django-highlightjs has some pre-configured settings.\nThey can be modified by adding a dict variable called ``HIGHLIGHTJS`` in your ``settings.py`` and customizing the values you want.\nThe ``HIGHLIGHTJS`` dict variable is contains these settings and defaults:\n\n .. code:: Python\n\n HIGHLIGHTJS = {\n # The URL to the jQuery JavaScript file\n 'jquery_url': '//code.jquery.com/jquery.min.js',\n # The highlight.js base URL\n 'base_url': '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js',\n # The complete URL to the highlight.js CSS file\n 'css_url': '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/{0}.min.css',\n # Include jQuery with highlight.js JavaScript (affects django-highlightjs template tags)\n 'include_jquery': False,\n # The default used style.\n 'style': 'monokai_sublime',\n }\n\n\nUsage in your `settings.py`:\n .. code:: Python\n\n HIGHLIGHTJS = {\n 'style': 'github',\n }\n\nAll other styles available at https://github.com/isagalaev/highlight.js/tree/master/src/styles\n\n\nExample template\n----------------\n\n .. code:: Django\n\n {% load highlightjs %}\n \n
\n \n \n \n {# Highlight Syntax using Highlightjs #}\n\n {% highlightjs_this code_to_highlight %}\n {% highlightjs_this code_to_highlight 'python' %}\n\n {% highlightjs_javascript jquery=1 %}\n \n \n\n\nRequirements\n------------\n\n- Python 2.7, 3.4, 3.5 or 3.6\n- Django >= 1.8\n\nContributions and pull requests for other Django and Python versions are welcome.\n\n\nBugs and requests\n-----------------\n\nIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.\n\nhttps://github.com/MounirMesselmeni/django-highlightjs/issues\n\n\nLicense\n-------\n\nYou can use this under MIT See `LICENSE\n