Update README.md

This commit is contained in:
Joe Hutchinson
2019-07-19 10:40:50 -04:00
committed by GitHub
parent 38950aa5c1
commit 000567bf75

View File

@@ -107,14 +107,14 @@ Shortcodes extend markdown to make writing easier and more powerful.
`image` is how you add WebP images to your posts with a fallback in case WebP is not supported. Image just needs the src and alt parameters. WebP is a next-gen image format that was created to make the web fast. To use the image shortcode simply store a WebP image with the same name in the same directory as your normal image.
```html
<!--- Will display a WebP image on supported browsers if img/awesome.webp exists -->
<!--- Will display a WebP image on supported browsers if post/awesome-post/awesome.webp exists -->
{{<image src="post/awesome-post/awesome.jpg" alt="An awesome image that will use webp when possible. Much faster!" >}}
```
`smallimg` allows you to add images to your posts without stretching them to be as wide as the content area. Smallimg takes the parameters src, alt, smartfloat (optional), and width (optional). The smartfloat parameter can be set to right or left, and it floats the image to the right or left on big enough screens.
```html
<!--- smallimg will also display a WebP image on supported browsers if img/smile.webp exists -->
<!--- smallimg will also display a WebP image on supported browsers if post/smile-post/smile.webp exists -->
{{<smallimg src="post/smile-post/smile.png" alt="A big beautiful smile" smartfloat="left" width="100px">}}
```