diff --git a/content/post/2019-12-20-informative-title/chunkname-1.png b/content/post/2019-12-20-informative-title/chunkname-1.png new file mode 100644 index 00000000..3d9a33f8 Binary files /dev/null and b/content/post/2019-12-20-informative-title/chunkname-1.png differ diff --git a/content/post/2019-12-20-informative-title/index.Rmd b/content/post/2019-12-20-informative-title/index.Rmd new file mode 100644 index 00000000..8a9b4897 --- /dev/null +++ b/content/post/2019-12-20-informative-title/index.Rmd @@ -0,0 +1,86 @@ +--- +slug: informative-title +title: Your Post Title in Title Case +authors: + - Julia Romanowska +date: 2019-12-20 +tags: +- package development +output: + html_document: + keep_md: true +--- + +> This post was contributed by [Julia Romanowska](https://www.uib.no/en/persons/Julia.Romanowska), Researcher at the University of Bergen, Norway. Thank you, Julia! + +```{r setup, include=FALSE} +knitr::opts_chunk$set(fig.path = "", comment = "") + +knitr::knit_hooks$set( + plot = function(x, options) { + hugoopts <- options$hugoopts + paste0( + "{{
}}\n" + ) + } +) +``` + +The figure paths in the resulting Markdown will already be valid so you won't need to edit the Markdown file. + +Introduction including outline of the post. + +## First section + +I like Hugo[^1]. Yes, that is how you add a footnote. + +### First subsection + +Below is an image, for instance your package logo, or a cute puppy picture. Here's how to use a Hugo shortcode to include it. You must use the exact same syntax as below i.e. with the html preserve comments and percent signs, otherwise the knitting will break the syntax. You can use [all options documented for the figure shortcode](https://gohugo.io/content-management/shortcodes/#figure). + + {{% figure src = "name-of-image.png" width = "200" alt = "this is the alternative text" %}} + + +Here's how to introduce the same image but centered and bigger. Notice ` width = "400"` and `class = "center"`. + + {{% figure src = "name-of-image.png" width = "400" alt = "this is the alternative text" class = "center" %}} + + +And here's how you'd pull it to the right. Notice `class = "pull-right"`. + + {{% figure src = "name-of-image.png" width = "200" alt = "this is the alternative text" class = "pull-right" %}} + + +Below is another image, a plot generated by a code chunk, so you might see how to add alternative text and other options in this case. You can also use [all options documented for the figure shortcode](https://gohugo.io/content-management/shortcodes/#figure) except for `src` that will be created automatically when knitting. + +```{r chunkname, hugoopts=list(alt="alternative text please make it informative", title="title of the image", caption="this is what this image shows, write it here or in the paragraph after the image as you prefer", width=300)} +plot(1:10) +``` + + +Once this file is knitted the plot above will be inserted with the correct syntax. + +### Second subsection + +Here's how to use a Hugo shortcode to embed a tweet. We recommend the use of [Hugo shortcodes](https://gohugo.io/content-management/shortcodes/) to include tweets, Vimeo or Youtube videos, gists, etc. Again, use the exact same syntax as below i.e. with the html preserve comments and percent signs, otherwise the knitting will break the syntax. + + {{% tweet 1110477831019085824 %}} + + +## Conclusion + +Have fun writing your blog post! + +> Find Julia on Twitter, her website, blabla. + +Here's how to add the footnote text for your reference above. + +[^1]: Hugo! https://gohugo.io/ diff --git a/content/post/2019-12-20-informative-title/index.md b/content/post/2019-12-20-informative-title/index.md new file mode 100644 index 00000000..72573331 --- /dev/null +++ b/content/post/2019-12-20-informative-title/index.md @@ -0,0 +1,70 @@ +--- +slug: informative-title +title: Your Post Title in Title Case +authors: + - Julia Romanowska +date: 2019-12-20 +tags: +- package development +output: + html_document: + keep_md: true +--- + +> This post was contributed by [Julia Romanowska](https://www.uib.no/en/persons/Julia.Romanowska), Researcher at the University of Bergen, Norway. Thank you, Julia! + + + +The figure paths in the resulting Markdown will already be valid so you won't need to edit the Markdown file. + +Introduction including outline of the post. + +## First section + +I like Hugo[^1]. Yes, that is how you add a footnote. + +### First subsection + +Below is an image, for instance your package logo, or a cute puppy picture. Here's how to use a Hugo shortcode to include it. You must use the exact same syntax as below i.e. with the html preserve comments and percent signs, otherwise the knitting will break the syntax. You can use [all options documented for the figure shortcode](https://gohugo.io/content-management/shortcodes/#figure). + + {{% figure src = "name-of-image.png" width = "200" alt = "this is the alternative text" %}} + + +Here's how to introduce the same image but centered and bigger. Notice ` width = "400"` and `class = "center"`. + + {{% figure src = "name-of-image.png" width = "400" alt = "this is the alternative text" class = "center" %}} + + +And here's how you'd pull it to the right. Notice `class = "pull-right"`. + + {{% figure src = "name-of-image.png" width = "200" alt = "this is the alternative text" class = "pull-right" %}} + + +Below is another image, a plot generated by a code chunk, so you might see how to add alternative text and other options in this case. You can also use [all options documented for the figure shortcode](https://gohugo.io/content-management/shortcodes/#figure) except for `src` that will be created automatically when knitting. + + +```r +plot(1:10) +``` + +{{
}} + + +Once this file is knitted the plot above will be inserted with the correct syntax. + +### Second subsection + +Here's how to use a Hugo shortcode to embed a tweet. We recommend the use of [Hugo shortcodes](https://gohugo.io/content-management/shortcodes/) to include tweets, Vimeo or Youtube videos, gists, etc. Again, use the exact same syntax as below i.e. with the html preserve comments and percent signs, otherwise the knitting will break the syntax. + + {{% tweet 1110477831019085824 %}} + + +## Conclusion + +Have fun writing your blog post! + +> Find Julia on Twitter, her website, blabla. + +Here's how to add the footnote text for your reference above. + +[^1]: Hugo! https://gohugo.io/ diff --git a/content/post/2019-12-20-informative-title/name-of-image.png b/content/post/2019-12-20-informative-title/name-of-image.png new file mode 100644 index 00000000..42f08ed2 Binary files /dev/null and b/content/post/2019-12-20-informative-title/name-of-image.png differ