The following scripts are extentions for the Bear Blog platform. These are not official extensions to Bear and may need a bit of tweaking here and there. Consider contributing!
They are separated into Blog and Dashboard tools to distinguish if they are used on the rendering of the blog, or if they are an extension to the Bear editor and dashboard.
These extensions can be used by copying and pasting the JS into a <script></script> tag in the footer directive of your blog.
Copying the code is preferred over linking via the GitHub CDN
- It gives you more control over the script which can be modified as you see fit
- It loads instantly without additional network requests
- It prevents plugin updates from negatively affecting your blog
Add pagination to blog page and post embeds instead of displaying all posts at once.
Display the estimated reading time for a post.
Search post titles on the blog page with a search input.
Easily open the post or homepage editor using Ctrl + E
Adds a button to code blocks to easily copy the content.
Add a password to a blog in order to view the content.
Note: This is circumventable by anyone with a decent understanding of JavaScript and so should only be used to protect non-sensitive information.
Generate a table of contents at the top of a post based on the titles in the post. Configuration at top of script.
Display clickable tag links next to each post on the blog page, linking to filtered views.
Redirect a custom domain blog with a www subdomain to the root domain.
*Note: This is best added to the <head> section instead of the <footer> section since it needs to execute immediately.
Converts inline currency amounts to a selected currency using live exchange rates. Add <span class="currency" data-amount="100 USD">$100</span> to your posts and a global dropdown will appear allowing readers to convert all amounts at once.
Translates Bear Blog UI snippets (footer "Powered by" text, subscribe page, and upvote button labels) into another language. Defaults to Portuguese (pt-BR) — modify the replacement strings for your language.
These scripts can be added to the footer of your dashboard in a <script></script> element.
Store a version history in browser for easy recovery of older versions of posts
Expands the post and homepage content editor to the bottom of the screen.
Count and display total posts and pages in the dashboard.
Automatically ensures all lines have two spaces at the end, so Markdown will render new lines. Without two spaces at the end, text written on different lines (without a blank line between them) will render in your post as being on one line.
Replaces the Bear Blog post editor with the Overtype markdown editor, providing syntax highlighting and shortcuts for markdown features.
Replaces the Bear Blog post editor with the Ace code editor, providing Markdown syntax highlighting and enhanced editing features.
The plugin loads its dependencies automatically — no extra script tags needed.
The CSS file can optionally be added to your Dashboard Styles for a customised Solarized Dark theme with Markdown-aware styling.
The Markdown power-editor by René is custom built for Bear and pretty neat.*