Skip to content

Commit

Permalink
editing example to bare minimum code
Browse files Browse the repository at this point in the history
removing CHANGES.txt entry
making a new section in manual.txt for embedding images
  • Loading branch information
abrahamvarricatt committed Sep 6, 2016
1 parent 191c9a8 commit 7817755
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Bugfixes
--------

* Don’t crash if a post list has no posts (Issue #2489)
* Clarify conf.py documentation on using images

Features
--------
Expand Down
18 changes: 18 additions & 0 deletions docs/manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,24 @@ be stripped. For example ``03_an_amazing_sunrise.jpg`` will be render as *An ama
Here is a `demo gallery </galleries/demo>`_ of historic, public domain Nikola
Tesla pictures taken from `this site <http://kerryr.net/pioneers/gallery/tesla.htm>`_.

Embedding images
~~~~~~~~~~~~~~~~

Assuming that you have your pictures stored in a folder called images (as configured above),
you can embed the same in your posts with the following ReST directive,

.. code:: python

..image:: /images/example.png
:height: 300px
:width: 50px
:alt: My example image.
:align: center

The above code will over-ride existing image attributes - you can ignore them if it's
not needed (NOTE: There is also a corresponding ReST directive for
thumbnails ``.. thumbnail::`` ).

Handling EXIF Data
------------------

Expand Down
5 changes: 1 addition & 4 deletions nikola/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,7 @@ GITHUB_COMMIT_SOURCE = True
# For example, if IMAGE_FOLDERS = {'images': 'images'}, write
#
# ..image:: /images/example.png
# :height: 300px
# :width: 50px
# :alt: My example image.
# :align: center
#

# Images will be scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE
# options, but will have to be referenced manually to be visible on the site
Expand Down

0 comments on commit 7817755

Please sign in to comment.