hexo-theme-icarus/source/_posts/plugin/Gallery.md

42 lines
1.3 KiB
Markdown

title: Gallery Plugin
date: 2016-01-31
categories:
- Plugins
- General
---
You can create a gallery by just adding photos in the post, and enable the gallery plugin in the `_config.yml`:
```yml
plugins:
gallery: true
```
<!-- more -->
Furthermore, you can also use Justified Gallery to display you photos in a grid:
{% codeblock lang:html HTML + Markdown %}
<div class="justified-gallery">
![Elephant](/hexo-theme-icarus/gallery/animals/elephant.jpeg)
![Dog](/hexo-theme-icarus/gallery/animals/dog.jpeg)
![Birds](/hexo-theme-icarus/gallery/animals/birds.jpeg)
![Cat](/hexo-theme-icarus/gallery/animals/cat.jpeg)
![Fox](/hexo-theme-icarus/gallery/animals/fox.jpeg)
![Horse](/hexo-theme-icarus/gallery/animals/horse.jpeg)
![Leopard](/hexo-theme-icarus/gallery/animals/leopard.jpeg)
</div>
{% endcodeblock %}
{% quote %}
The following photos come from <a href="https://www.pexels.com">pexel.com</a>
{% endquote %}
<div class="justified-gallery">
![Elephant](/hexo-theme-icarus/gallery/animals/elephant.jpeg)
![Dog](/hexo-theme-icarus/gallery/animals/dog.jpeg)
![Birds](/hexo-theme-icarus/gallery/animals/birds.jpeg)
![Cat](/hexo-theme-icarus/gallery/animals/cat.jpeg)
![Fox](/hexo-theme-icarus/gallery/animals/fox.jpeg)
![Horse](/hexo-theme-icarus/gallery/animals/horse.jpeg)
![Leopard](/hexo-theme-icarus/gallery/animals/leopard.jpeg)
</div>