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

Clarify image usage #2494

Merged
merged 3 commits into from Sep 8, 2016
Jump to file or symbol
Failed to load files and symbols.
+27 −4
Diff settings

Always

Just for now

View
@@ -1617,6 +1617,19 @@ 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:: rest
..image:: /images/example.png
Please take note of the leading forward-slash ``/`` which is used to refer to a location
in IMAGE_FOLDERS.
Handling EXIF Data
------------------
View
@@ -613,11 +613,21 @@ GITHUB_COMMIT_SOURCE = True
# Embedded thumbnail information:
# EXIF_WHITELIST['1st'] = ["*"]
# Folders containing images to be used in normal posts or pages. 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
# Folders containing images to be used in normal posts or pages.
# IMAGE_FOLDERS is a dictionary of the form {"source": "destination"},
# where "source" is the folder containing the images to be published, and
# "destination" is the folder under OUTPUT_PATH containing the images copied
# to the site. Thumbnail images will be published there as well.
# To reference the images in your posts, include a leading slash in the path.
# For example, if IMAGE_FOLDERS = {'images': 'images'}, write
#
# ..image:: /images/example.png
#
# 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
# (the thumbnail has ``.thumbnail`` added before the file extension).
# The format is a dictionary of {source: relative destination}.
IMAGE_FOLDERS = {'images': 'images'}
# IMAGE_THUMBNAIL_SIZE = 400
ProTip! Use n and p to navigate between commits in a pull request.