mulder21c / hexo-theme-amorfati

A responsive simple theme for Hexo.
https://mulder21c.github.io
MIT License
12 stars 4 forks source link
hexo hexo-blog hexo-blog-theme hexo-theme

⛔️ DEPRECATED - no longer actively maintained

This theme is no longer managed because many changes are required to support the current version of hexo. I'm working on a new theme here.

You can only use this theme in hexo 4.x.


hexo-theme-amorfati

Language

Korean

Demo

You can refer to my blog or demo site

screenshot

Support Browsers

Feature

Installation

First, clone this repository

$ cd your/hexo/directory
$ git clone -b master --single-branch --depth=1 https://github.com/mulder21c/hexo-theme-amorfati.git themes/amorfati

Then, install dependencies

This process include installing web fonts required for theme and inserting font and CSS files into theme's directory. Refer to copy-resource.js file.

$ cd themes/amorfati
$ npm install

note: When you update from version 1.0.4 or lower you should remove hexo-server-jade. It was deprecated, so that I replaced that renderer to hexo-server-pug

Configuration

See the _config.yml.example

Hero

Images set in Hero are exposed at the top of the home, list layout pages (like archive).
You can set hero to either object or url string.

hero:
  url:
  width:
  height:
  size:
  position:

If you set the dimensions of the image, these values can be used in JSONLD.

Or

hero:

hero: in this case, image url you want to use as hero

Example

hero:
  url: /upload/hero.jpg
  width: 980
  height: 550
hero:
  url: /upload/hero.jpg
  width: 980
  height: 550
  position: center top

Profile

profile:
  gravatar:
  social:
    github:
    facebook:
    linkedin:
    instagram:
    twitter:
    flickr:
    rss:

Example

profile:
  gravatar: /upload/gravatar.png
  social:
    github: https://github.com/mulder21c
    facebook: https://www.facebook.com/mulder21c
    linkedin:
    instagram:
    twitter:
    flickr:
    rss:

Site Verification Ownership

site_verification:
  enable:
  google:
  naver:
  bing:

Analytics

analytics:
  google:
  naver:

Webfonts

webfonts:
  uses:
  extraFonts:

Examples

External Link

  links:

If set this item, the external links section within the sidebar navigation is exposed.

Examples

  links:
    - name: Ask
      url: https://ask.fm/myask

Comments

liveRe:
  uid:

disqus:
  shortname:

Set the comment platform you want to use.

Front matter

You can see the whole configs in post.md.

Subtitle

title:
subtitle:

Comment Disable

title:
comment:

360° Viewer

title:
viewer360:
  use:
  className:

In order to use the 360 viewer, you must to write in the body as follows.

<!-- Here is an example -->
<div class="viewer360"
  data-src="https://github.com/mulder21c/hexo-theme-amorfati/raw/master/your/360/image.jpg"
  data-width="800"
  data-height="600">
</div>

Post-specific Hero

title:
hero:
  url:
  width:
  height:
  size:
  position:

Or,

title:
hero:

Thumbnail for Post-list

title:
thumbnail:

thumbnail: The iamge url of the thumbnail you want to expose to the post list

Note: This config only affects the post list.

Post-specific Open Graph and JSONLD

title:
seo:
  description:
  author:
  image:
  genre:

Post-specific Style

You can create post-specific additional styles with css or SCSS, and this style will be rendered as <style>...</style> inside the head element.

title:
style:

Example

title:
style: |
  .article__content {
    small: {
      font-size: $smallest-font-size;
    }
  }

File Structure

Pug Structure

./layout
  ├── elements
  │      ├── article
  │      │     ├── meta.pug           # article's meta information to place at the top of article
  │      │     └── tags.pug           # tag list to place at the end of article
  │      │
  │      ├── foot                   # Components used just above </body>
  │      │     └── js-plugins.pug     # javascript component to place at the end of the document
  │      │
  │      ├── head                   # Components used in <head>...</head>
  │      │     ├── analytics.pug
  │      │     ├── icons.pug
  │      │     ├── jsonld.pug
  │      │     ├── links.pug
  │      │     ├── opengraph.pug
  │      │     ├── preload.pug
  │      │     ├── style.pug
  │      │     ├── title.pug
  │      │     └── verify-website.pug
  │      │
  │      ├── comment.pug              # comment component
  │      └── pagination.pug           # pagination component
  │
  ├── partials
  │      ├── article.pug
  │      ├── container.pug
  │      ├── foot.pug
  │      ├── footer.pug
  │      ├── head.pug
  │      ├── header.pug
  │      ├── layout.pug
  │      ├── post-list.pug
  │      └── sidebar.pug
  ├── archive.pug
  ├── category.pug
  ├── index.pug
  ├── page.pug
  ├── post.pug
  └── tag.pug

SCSS Structure

./source/css
  ├── helpers
  │      ├── _mixins.scss             # Most used mixins
  │      └── _placeholder.scss        # Most used placeholder
  │
  ├── modules
  │      ├── _functions.scss          # Global functions
  │      ├── _reset.scss              # Reset
  │      └── _variables.scss          # Global variables
  │
  ├── partials
  │      ├── _elements.scss           # Set of elements
  │      ├── _layout.scss             # Global parts of the layout
  │      └── _typography.scss         # Typography settings and declarations
  │
  ├── dracula.scss                    # Highlight.js dracular theme
  └── style.scss                      # Primary scss file