Skip to main content

r:article:{attr}

Like <r:page:{attr} />, this is not a tag by itself but rather a collection of tags that allow you to display information about a blog article. You can use any of the following tags that follow this format:

  • <r:article:path /> - The URL of the article page. This is most useful in a blog index.
  • <r:article:name /> - The title of the article.
  • <r:article:author_full_name /> - The name of the creator of the article
  • <r:article:content name="name-of-editable-region" /> - Grabs the content of an editable region in a blog article. The nameattribute is required.

See an example of r:article being used in the CleanSlate toolkit.

article.{attr}

Like page.{attr}, this is not a tag by itself but rather a collection of tags that allow you to display information about a blog article.

article.{attr} must be used on a Blog Article or Blog Index page type. Or, it must be used in a loop inside of the blog context (likely via get_page).

article.{attr} accepts all of the same attributes as page.{attr}. Please reference the page.{attr} documentation for a complete list of available attributes—just be sure to replace page with article. Eg: {{ page.id }} becomes {{ article.id }}.

Examples

{{ article.id }} <!-- 138 -->
{{ article.name }} <!-- Sally's Delicious Sweets -->
{{ article.slug }} <!-- sallys-delicious-sweets -->
{{ article.author.full_name }} <!-- May Day -->
{{ article.published_at | date: "%A, %B %d, %Y" | default: "Not Yet Published" }} <!-- Friday, January 15, 2021 -->
<!-- ...and many more... -->

Getting content from an editable region in a blog post:

{{ article.content["article-body"] | select_html: css_selector: "p", limit: 2 }}

If you want to use the code above on a Blog Index page, be sure to use it inside of a for loop.

See an example of article.{attr} being used in the CleanSlate Toolkit.

Last updated on March 15, 2021.

We welcome all questions, feedback and bug reports. If you're having an issue, we usually need the following information:

  • A brief description of the issue
  • A link to the page where you saw the issue
  • Screenshots that illustrate the problem - How do I take a screenshot?

Kindly email CleanSlate@mail.wvu.edu for help or use the form on the request help page.