- Home and Blog pages with different layouts
- Responsive
- Google Analytics
- Pagination
- Pages
- Categories Support
- About page
- Sass Scss
You can install the theme by using:
$ git clone https://github.com/carlos-algms/hexo-theme-materialize.git themes/materialize
Then update your blog's main _config.yml
to set the theme to materialize
:
i.e:
# Extensions
## Plugins: http://hexo.io/plugins/
## Themes: http://hexo.io/themes/
theme: materialize
After this, uninstall hexo-generator-index
since this theme will use a custom index, we do not need this generator.
npm uninstall --save hexo-generator-index
Create your custom index file on source/index.html
:
---
layout: index
title:
comments: false
---
<h1>Hello World</h1>
You can configure any url you may want to serve your blog content, follow the suggested one:
permalink: blog/:title/
tag_dir: blog/tags
archive_dir: blog
category_dir: blog/categories
Each post supports the standard title
, date
, updated
, categories
, and tags
.
Example:
title: Welcome to Materialize
tags: ['ThisIsATag', 'Intro', 'Welcome']
date: 2017-04-08 23:32:59
updated: 2021-01-25 10:00:00
---
The theme's configuration is done on your project's root folder in the file _config.yml
.
The menu items listed on the top-right
# Header
menu:
Home: /
Blog: /blog
PS: The Blog
menu must match your archive_dir
config.
If set, page-views will be tracked automatically, in production only, not on local development
# Google Analytics Tracking ID
google_analytics: UA-XXXXXX-Y
Or even the new G4 Analytics:
# Google Analytics G4 Tracking ID
google_analytics: G-XXXXXXXXXX
Favicon file without the extension.
Please, provide a png
file AND a .ico
for legacy browsers.
favicon: images/favicon
When set, it will create the openGraph tags in the <head>
of your site.
twitter: userXX
google_plus: user-XX
fb_admins: idem
fb_app_id: idem
In case you ara generating you XML file, use this settings to create a link to the xml file in the <head>
tag.
rss: /atom.xml
The "Read More +" label used in the button.
excerpt_link: Read More
PS: To create the "Read More" button, just add <!-- more -->
anywhere in your post.
This theme was created by Carlos A. Gomes, check out my github and blog.
If you have a question, feature request or a bug you need me to fix, please click here to file an issue.
MIT
Enjoy :)