A modern, purple-accented Bootstrap 4 blog theme for Hexo.
Based on the official Bootstrap 4 blog example template.
Uses Fancybox for images.
This theme was built with Hexo 3.2.
$ cd site-folder
$ git clone https://github.com/azigler/hexo-theme-space-cadet.git themes/hexo-theme-space-cadet
$ dd
# Extensions
theme: hexo-theme-space-cadet
# Header
navbar_brand:
menu:
Index: /
Archive: archive/
# RSS
rss:
# Content
favicon: favicon.ico
excerpt_link: Read More
fancybox: true
# Sidebar
widgets:
- about
- category
- tag
- tagcloud
- archive
- recent_posts
about_widget_content: >
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod.
Cras mattis consectetur purus sit amet fermentum. Aenean
lacinia bibendum nulla sed consectetur.</p>
# Widgets
archive_type: 'monthly'
show_count: true
# Meta Maker
title_divider:
twitter_creator:
twitter_site:
google_plus:
fb_personal_id: ""
fb_page_id:
fb_admins:
fb_app_id:
og_image_url: ""
# Analytics
google_analytics:
- navbar_brand: text for navbar head
- menu: hyphenated list of menu links
- rss: relative URL for atom.xml file
- favicon: filename of favicon.ico in main directory
- excerpt_link: text for excerpt button, default is 'Read More'
- fancybox: default is true, allows Fancybox for better images
- widgets: hypenated list of widget partials in folder
- about_widget_content: the sidebar's about text
- archive_type: measurement for archive, default is 'monthly'
- show_count: If true, show post count after categories and tags
- title_divider: divider symbol in titles between site and page name
- twitter_creator: author's Twitter username (include @ in double quotes)
- twitter_site: Twitter brand/company username (include @ in double quotes)
- google_plus: Google+ ID (in double quotes)
- fb_personal_id: Facebook vanity URL username of author
- fb_page_id:
- fb_admins:
- fb_app_id:
- og_image_url: absolute path
- google_analytics: Google Analytics tracking ID for site
Bootstrap doesn't have callouts enabled by default, but their styles have been reconstructed and included in this theme. You can use the following tag to include a callout:
{% callout [type:default|primary|success|info|warning|danger] %}
This is where the text goes...
{% endcallout %}
This theme has 6 default widgets that can be displayed in the sidebar:
- about: the
about_widget_content
field in the theme's_config.yml
- category: list of post and page categories
- tag: list of post and page tags
- tagcloud: cloud of tags by frequency
- archives: list of archives
- recent_posts: list of recent posts
A custom bs_paginator()
helper is used to produce pagination markup for Bootstrap 4. It is used in place of Hexo's default paginator()
.
<%- bs_paginator({
prev_text: __('previous'),
next_text: __('next')
}) %>
Use instead of Hexo's default open_graph()
helper on every page. It pulls OG data from your site's _config.yml
files to ensure every page has meta data for all major social media networks (Facebook, Twitter, LinkedIn, and Google+).
<%- meta_maker() %>
The article partials also include schema tags from Schema.org and pre-optimized. You can use the Google Structured Data Testing Tool to verify the schema integrity of your articles.