ʕ ꈍᴥꈍʔ Bear docs

Anatomy of a post

Pages are posts which have is_page set to true. These do not show up in the blog feed and behave as pages instead of blog posts.

All post information needs to be at the top of the page above the line separator, with each header item on a separate line.

title: I like Bears
link: i-like-bears
alias: 2012/01/02/cool-post.html
canonical_url: https://example.com/i-like-bears
published_date: 2022-12-30
is_page: false
meta_description: Bears are pretty cool, according to science.
meta_image: https://i.imgur.com/3jxqrKP.jpeg
tags: bears, writing, thoughts
make_discoverable: true
class_name: bear-style
___

Here is my article outlining why bears are dope.

title

The title will show at the top of the post and on the blog list (assuming is_page isn't set to true).

link

optional

The relative link to the page. For example, if the link is set to i-like-bears this will show up at https://subdomain.bearblog.dev/i-like-bears or https://customdomain.com/i-like-bears.

This will be automatically generated from the title if not explicitly set. A title of This is a post will automatically generate a link of this-is-a-post.

alias

optional

If you have a popular page at an unconventional path and do not want it to 404 when migrating to Bear, this traffic can be forwarded by using an alias. Traffic to https://example.com/category/thoughts/2022/12/01/thinking.html can be forwarded to your post at https://example.com/thinking/ by using the following alias:

alias: category/thoughts/2022/12/01/thinking.html

canonical_url

optional

The canonical url is a meta element representing the "original" piece of writing in order for search engines to determine which one to index. If this post is the original, the canonical_url can be left blank and will default to pointing to this post. If the post is a repost of content elsewhere online, set the canonical_url to the url of the original post.

lang

optional (default: the language of the blog)

The html lang attribute to specify the language of the post.

published_date

optional (default: now)

The date at which the article is to be published. This can be left blank to post now or be set using the following standard: YYYY-MM-DD

If the published_date is set to a future date, the the post will only show in the blog list or the discovery feed (assuming make_discoverable is true) at midnight UTC on the specified date.

To specify a time, use the format YYYY-MM-DD HH:MM at UTC. If no explicit time is set it will default to midnight UTC.

is_page

optional (default: false)

This attribute specifies whether the post should function as a page or a blog post. If set to true, the post will not show up in the blog list, and will act for all intents and purposes as a page (not a blog post).

The page can be linked in the navigation bar of the blog using its link. For example: [About me](/about-me/) can be added where the post (or page) has the link attribute set to about-me.

meta_description

optional (default: first 160 characters of content)

This is the description of the post that shows up in search engines or when links are shared in messenger apps or social media. If no meta description is set, it will default to the first 160 characters of the content of the post.

meta_image

optional

This is a link to an image that will display when the link to this post is shared on social media or in messenger apps.

tags

optional

A comma-separated list of tags used for categorising the blog posts. This will auto-generate links in the blog list to filter posts. It can also be used to create custom blog list pages using the filtered lists.

make_discoverable

optional (default: true)

This allows the post to be discovered in the Bear Blog discovery feed. It is set to true by default.

class_name

optional

This adds a classname to the root of that post so that post can have css styling information associated with it.

content

Content is all the text below the line separator. This is written in Markdown or HTML and is rendered as HTML.

Filtered lists of posts (eg: Latest blog posts) can be inserted using these methods.

Blog and post attributes can also be referenced in content by using the following parameters:

{{ blog_title }}
{{ blog_description }} 
{{ blog_link }}
{{ blog_created_date }}
{{ blog_last_modified }} ago
{{ blog_last_posted }} ago

{{ post_title }}
{{ post_description }}
{{ post_link }}
{{ post_published_date }}
{{ post_last_modified }} ago