Permalink
Browse files

New thumbnail shortcode

  • Loading branch information...
ralsina committed Sep 18, 2017
1 parent a9c0889 commit cab7b40153caf47c6a296055960033e6c3f563e5
Showing with 6 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +3 −0 docs/manual.txt
  3. +1 −0 nikola/data/shortcodes/jinja/thumbnail.tmpl
  4. +1 −0 nikola/data/shortcodes/mako/thumbnail.tmpl
@@ -4,6 +4,7 @@ New in master
Features
--------

* New 'thumbnail' shortcode (Issue #2809)
* Rewrite ``nikola auto`` with asyncio and aiohttp (Issue #2850)
* New ``listings`` shortcode similar to the reStructuredText listings
directive (Issue #2868)
@@ -1232,6 +1232,9 @@ raw
Passes the content along, mostly used so I can write this damn section and you can see the shortcodes instead
of them being munged into shortcode **output**. I can't show an example because Inception.

thumbnail
Takes as argument a path to an image, and it will show the thumbnail as a link to the full-sized image
(it's pretty basic, could be improved).

Community shortcodes
~~~~~~~~~~~~~~~~~~~~
@@ -0,0 +1 @@
<a href="{{ _args[0] }}"><img src="{{ '.thumbnail.'.join(_args[0].rsplit('.', 1)) }}"></a>
@@ -0,0 +1 @@
<a href="${_args[0]}"><img src="${'.thumbnail.'.join(_args[0].rsplit('.', 1))}"></a>

0 comments on commit cab7b40

Please sign in to comment.