Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

dado3212/anchor-folium

Repository files navigation

Folium

Folium is a theme for Anchor (Github), a lightweight blog system that I use on my blog.

This is what it looks like:

Screenshot 2025-05-23 at 11 35 24 PM

Fonts

  • Vollkolm (too thick)

Additions

There are a number of additions I've made to the base code. This is probably not exhaustive, but it's a lot of them.

There are also some that aren't documented.

Automatically making links open in a new tab
/anchor/libraries/markdown.php

function _doAnchors_inline_callback($matches) {
   ...
-   $result = "<a href=\"$url\"";
+   $result = "<a target=\"_blank\" href=\"$url\"";
   ...

Copied over time constants from the official repo /anchor/language/en_GB/posts.php

+  'time'         => 'Published on (GMT)',
+  'time_explain' => 'Pattern: YYYY-MM-DD HH:MM:SS',
+  'time_invalid' => 'Invalid time pattern',

and in the UI, to be able to adjust publication date. /anchor/views/posts/edit.php

    <em><?php echo __('posts.slug_explain'); ?></em>
  </p>
+  <p>
+    <label><?php echo __('posts.time'); ?>:</label>
+    <?php echo Form::text('created', Input::previous('created', $article->created)); ?>
+    <em><?php echo __('posts.time_explain'); ?></em>
+  </p>

Inspiration

TODO

  • Display category of post (or tags?)
  • Handle dark mode

Reduced the Font Awesome from 160kb to 680 bytes with pyftsubset fa-solid-900.woff2 --unicodes="U+f328,U+f121" --flavor="woff2" --output-file="fa-solid-900-subset.woff2", the only two characters that prism currently uses.

About

A theme for Anchor, a lightweight blog CMS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published