Check your post

Functions to be run on the path to your blog post (rendered, not the Rmd).

Best practice

ro_lint_md() should identify some potential problems and enforce:

  • the use of complete alternative descriptions for image;

  • the use of Title Case for the title;

  • the use of Sentence case for other headings;

  • the absence of “click here” as text for links;

  • the proper case (lowerCamelCase) for rOpenSci name;

  • the use of Hugo shortcodes for figures;

  • the use of Hugo shortcodes for tweets;

  • the use of relative links for links to rOpenSci website.

You need to run render_one on the path to the Markdown file. Some Markdown examples and the corresponding messages below.


/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/absolute-links.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

 [rOpenSci blog](https://ropensci.org/blog)



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/allgood.md

---
slug: "post-template"
title: Wonderful Title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

Save this file under /content/blog/YEAR-MONTH-DAY-slug.md in the local copy of your roweb2 fork.
{{< figure src="orange-mug-near-macbook-3219546.jpg" width="300" link="https://www.pexels.com/photo/orange-mug-near-macbook-3219546/" alt="Laptop keyboard with a tree leaf beside it" class="center" caption="Another type of leaf. [Engin Akyurt on Pexels](https://www.pexels.com/photo/orange-mug-near-macbook-3219546/)." >}}
s
{{< figure src="orange-mug-near-macbook-3219546.jpg" width="300" link="https://www.pexels.com/photo/orange-mug-near-macbook-3219546/" alt="Laptop keyboard with a tree leaf beside it" >}}
### Heading in sentence case

#### Another sentence as heading



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/bad-no-alt.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

Save this file under /content/blog/YEAR-MONTH-DAY-slug.md in the local copy of your roweb2 fork.

[Cool blog](/blog/)

[http](http://masalmon.eu/)

[Broken blog](https://masalmon.eu/40004)

[Broken blog again](https://masalmon.eu/400040)

Beware! If you want to generate this post from R Markdown, use the R Markdown template instead!

  Everywhere in this template (YAML, paths to images), you should change "post-template" to the slug of your post, and "2019-06-04" to the publication date.

Introduction including outline of the post.

### First awesome section

I like Hugo[^1]. Yes, that is how you add a footnote.

#### First awesome subsection of the first awesome section

Here's how to use a Hugo shortcode to add an image.

{{< figure src = "/img/blog-images/2019-06-04-post-template/name-of-image.png" width = "200">}}

{{< figure src = "/img/blog-images/2019-06-04-post-template/name-of-image.png" width = "200" alt = "too short">}}



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/clickhereissue.md

---
slug: "post-template"
title: Wonderful Title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

Save this file under /content/blog/YEAR-MONTH-DAY-slug.md in the local copy of your roweb2 fork.

### Heading in sentence case

#### Another sentence as heading

[Good link](https://twitter.com), [Click here](https://twitter.com), [here](https://twitter.com).



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/code-no-functions.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

```r
1

</details>
<br>


----

<details closed>
<summary> <span title='Click to Expand'> /tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/figureissue.md </span> </summary>

```Markdown

---
slug: "post-template"
title: Wonderful Title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

Save this file under /content/blog/YEAR-MONTH-DAY-slug.md in the local copy of your roweb2 fork.

### Heading in sentence case

#### Another sentence as heading

![altbabla](imagepath/on/laptop.png)



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/links.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

Save this file under /content/blog/YEAR-MONTH-DAY-slug.md in the local copy of your roweb2 fork.

[Cool blog](/blog/)

[bad](http://localhost:1313/blog)

[http](http://masalmon.eu/)

[Broken blog](https://masalmon.eu/40004)

[Broken blog again](https://masalmon.eu/400040)

[Broken local link](/4000004/)

[Missing slash](blog)

[Bad email link]([email protected])

[Good email link](mailto:[email protected])



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/multi-bad.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

 [rOpenSci blog](https://ropensci.org/blog)

#### First awesome subsection of the first awesome section

Here's how to use a Hugo shortcode to add an image.

{{< figure src = "/img/blog-images/2019-06-04-post-template/name-of-image.png" width = "200">}}

{{< figure src = "/img/blog-images/2019-06-04-post-template/name-of-image.png" width = "200" alt = "too short">}}



/tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/require.md

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

```r
require(blop)
require(bla)
require(lala)

</details>
<br>


----

<details closed>
<summary> <span title='Click to Expand'> /tmp/RtmpxlE9Nu/Rinstee05008b99d/roblog/examples/twitter-embed.md </span> </summary>

```Markdown

---
slug: "post-template"
title: Wonderful title
package_version: 0.1.0
authors:
  - Author Name
date: 2019-06-04
categories: blog
topicid:
tags:
  - Software Peer Review
  - R
  - community
# delete the line below
# if you have no preferred image
# for Twitter cards
twitterImg: img/blog-images/2019-06-04-post-template/name-of-image.png
---

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Finally... hello subtools 1.0! 🥳 Read, write and manipulate subtitles in <a href="https://twitter.com/hashtag/rstats?src=hash&amp;ref_src=twsrc%5Etfw">#rstats</a>. Substantially re-written to integrate with tidytext by <a href="https://twitter.com/juliasilge?ref_src=twsrc%5Etfw">@juliasilge</a> and <a href="https://twitter.com/drob?ref_src=twsrc%5Etfw">@drob</a> <a href="https://t.co/QmCWGk9NOX">https://t.co/QmCWGk9NOX</a> cc <a href="https://twitter.com/ma_salmon?ref_src=twsrc%5Etfw">@ma_salmon</a> <a href="https://t.co/7576oktL7k">pic.twitter.com/7576oktL7k</a></p>&mdash; Francois Keck (@FrancoisKeck) <a href="https://twitter.com/FrancoisKeck/status/1200040510540386304?ref_src=twsrc%5Etfw">November 28, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 


<blockquote class="twitter-tweet"><p lang="en" dir="ltr">When I try to become acquainted with a new (to me) <a href="https://twitter.com/hashtag/rstats?src=hash&amp;ref_src=twsrc%5Etfw">#rstats</a> package, I prefer to read ___________</p>&mdash; Jonathan Carroll (@carroll_jono) <a href="https://twitter.com/carroll_jono/status/969442252610191361?ref_src=twsrc%5Etfw">March 2, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 


URL validity

ro_check_urls() will identify possibly broken URLs.

path1 <- system.file(file.path("examples", "bad-no-alt.md"),
                                         package = "roblog")

roblog::ro_check_urls(path1)
#> • Possibly broken URLs: https://masalmon.eu/40004, https://masalmon.eu/400040.
#> • Replace http with https for: http://masalmon.eu/.