mirror of
https://github.com/gryf/jekyll-rst.git
synced 2025-12-22 14:08:02 +01:00
Update README
This commit is contained in:
35
README.rst
35
README.rst
@@ -2,7 +2,7 @@ Overview
|
|||||||
========
|
========
|
||||||
|
|
||||||
This plugin adds `ReStructuredText`_ support to `Jekyll`_ and `Octopress`_.
|
This plugin adds `ReStructuredText`_ support to `Jekyll`_ and `Octopress`_.
|
||||||
It renders ReST in posts and pages, and provides a custom directives to
|
It renders ReST in posts and pages, and provides a custom directive to
|
||||||
support Octopress-compatible syntax highlighting.
|
support Octopress-compatible syntax highlighting.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@@ -20,7 +20,7 @@ Installation
|
|||||||
|
|
||||||
The most convenient way is to use virtualenv_burrito:
|
The most convenient way is to use virtualenv_burrito:
|
||||||
|
|
||||||
.. sourcecode:: console
|
::
|
||||||
|
|
||||||
$ curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | bash
|
$ curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | bash
|
||||||
$ source /Users/xdissent/.venvburrito/startup.sh
|
$ source /Users/xdissent/.venvburrito/startup.sh
|
||||||
@@ -37,14 +37,14 @@ Installation
|
|||||||
|
|
||||||
For Jekyll:
|
For Jekyll:
|
||||||
|
|
||||||
.. sourcecode:: console
|
::
|
||||||
|
|
||||||
$ cd <jekyll-project-path>
|
$ cd <jekyll-project-path>
|
||||||
$ git submodule add https://github.com/xdissent/jekyll-rst.git _plugins/jekyll-rst
|
$ git submodule add https://github.com/xdissent/jekyll-rst.git _plugins/jekyll-rst
|
||||||
|
|
||||||
For Octopress:
|
For Octopress:
|
||||||
|
|
||||||
.. sourcecode:: console
|
::
|
||||||
|
|
||||||
$ cd <octopress-project-path>
|
$ cd <octopress-project-path>
|
||||||
$ git submodule add https://github.com/xdissent/jekyll-rst.git plugins/jekyll-rst
|
$ git submodule add https://github.com/xdissent/jekyll-rst.git plugins/jekyll-rst
|
||||||
@@ -57,13 +57,38 @@ Installation
|
|||||||
Marr's advice`_ and create a ``.venv`` file that will automatically
|
Marr's advice`_ and create a ``.venv`` file that will automatically
|
||||||
activate the ``jekyll-rst`` virtualenv when you ``cd`` into your project.
|
activate the ``jekyll-rst`` virtualenv when you ``cd`` into your project.
|
||||||
|
|
||||||
|
Source Code Highlighting
|
||||||
|
========================
|
||||||
|
|
||||||
|
A ``code-block`` ReST directive is registered and aliased as ``sourcecode``.
|
||||||
|
It adds syntax highlighting to code blocks in your documents::
|
||||||
|
|
||||||
|
.. code-block:: ruby
|
||||||
|
|
||||||
|
# Output "I love ReST"
|
||||||
|
say = "I love ReST"
|
||||||
|
puts say
|
||||||
|
|
||||||
|
Optional arguments exist to supply a caption, link, and link title::
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
:caption: Read Hacker News on a budget
|
||||||
|
:url: http://news.ycombinator.com
|
||||||
|
:title: Hacker News
|
||||||
|
|
||||||
|
$ curl http://news.ycombinator.com | less
|
||||||
|
|
||||||
|
Octopress already includes style sheets for syntax highlighting, but you'll
|
||||||
|
need to generate one yourself if using Jekyll::
|
||||||
|
|
||||||
|
$ pygmentize -S default -f html > css/pygments.css
|
||||||
|
|
||||||
Octopress Tips
|
Octopress Tips
|
||||||
==============
|
==============
|
||||||
|
|
||||||
* Use ``.. more`` in your ReST documents to indicate where Octopress's
|
* Use ``.. more`` in your ReST documents to indicate where Octopress's
|
||||||
``excerpt`` tag should split your content for summary views.
|
``excerpt`` tag should split your content for summary views.
|
||||||
|
|
||||||
|
|
||||||
.. _ReStructuredText: http://docutils.sourceforge.net/rst.html
|
.. _ReStructuredText: http://docutils.sourceforge.net/rst.html
|
||||||
.. _Jekyll: http://jekyllrb.com/
|
.. _Jekyll: http://jekyllrb.com/
|
||||||
.. _Octopress: http://octopress.com/
|
.. _Octopress: http://octopress.com/
|
||||||
|
|||||||
Reference in New Issue
Block a user