SoSimple

A So Simple Blog

SoSimple简介

So Simple!

Preview
Minimalist, fast, morden, full-featured hexo theme
Build Format

hexo-theme-sosimple is a minimalist theme.

Live Demo: https://lhcfl.github.io/hexo-theme-sosimple/

  • 📄 Minimalist: No fancy animations, dedicated to providing the purest page style.

  • Super Speed: Only 22.5 kB compressed javascript and css files, provides the fastest DOMContentLoaded speed.

  • 💻 Morden: Use modern template language and complete type annotations to provide a better development experience, with ten-years-ahead-of-hexo technology stack.

  • 😎 Geek: Optimized for no CSS and no JavaScript to ensure that it can be displayed normally under pure HTML. You can even just copy the entire page and paste it into a Markdown editor with the nice formatting kept :)

  • Full Featured: Supports automatic generating TOC, built-in full-text fuzzy search, dark/light mode switching, comments, and etc.

Installation

1
2
3
git clone https://github.com/Lhcfl/hexo-theme-sosimple.git themes/SoSimple
cd themes/SoSimple
pnpm i # You must do this

Configuration

copy _config.example.yml to _config.yml and edit it.

Change your hexo config: theme: SoSimple

Update

1
git pull origin main

Development

Structures

  • .github: GitHub CI config file
  • languages: I18n files
  • scripts: Hexo scripts
  • source: HTML assets
  • src: Typescript and SCSS source dir.

Formatting

After modifying the theme file, you can format it with the following command:

1
2
pnpm format
pnpm lint

See package.json

Hello World So Simple

So Simple!

Code Highlight Style test

Make sure all the code blocks highlighted correctly. All the code samples are come from the demo of https://highlightjs.org

Markdown Style test

This post is originated from here and is used for testing markdown style. This post contains nearly every markdown usage. Make sure all the markdown elements below show up correctly.

Images

This is a image test post.

Caption

Small Picture

2013-12-25

This post doesn’t have a title. Make sure it’s accessible.

Excerpts

The following contents should be invisible in home/archive page.

Videos

This is a video test post.

Youtube

Vimeo

Gallery Post

This post contains 4 photos:

  • Widescreen wallpaper
  • Portrait photo
  • Dual widescreen wallpaper
  • Small photo

All photos should be displayed properly.

From Wallbase.cc

Tag Plugins

This post is used for testing tag plugins. See docs for more info.

Block Quote

Normal blockquote

Praesent diam elit, interdum ut pulvinar placerat, imperdiet at magna.

Quote from a book

Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.

David LevithanWide Awake

Quote from Twitter

NEW: DevDocs now comes with syntax highlighting. http://devdocs.io

Quote from an article on the web

Every interaction is both precious and an opportunity to delight.

Code Block

Normal code block

1
alert('Hello World!');

With caption

Array.map
1
array.map(callback[, thisArg])

With caption and URL

.compactUnderscore.js
1
2
.compact([0, 1, false, 2, ‘’, 3]);
=> [1, 2, 3]

With marked lines

Line 1,7-8,10 should be marked with different color.

1
2
3
4
5
6
7
8
9
10
11
const http = require('http');

const hostname = '127.0.0.1';
const port = 1337;

http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});

Note: Theme’s style should support .highlight.line.marked (recommend to use the selection or current line color).

Gist

jsFiddle

Pullquote

Left

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus molestie arcu, et fringilla mauris placerat ac. Nullam luctus bibendum risus. Ut cursus sed ipsum feugiat egestas. Suspendisse elementum, velit eu consequat consequat, augue lorem dapibus libero, eget pulvinar dolor est sit amet nulla. Suspendisse a porta tortor, et posuere mi. Pellentesque ultricies, mi quis volutpat malesuada, erat felis vulputate nisl, ac congue ante tortor ut ante. Proin aliquam sem vel mauris tincidunt, eget scelerisque tortor euismod. Nulla tincidunt enim nec commodo dictum. Mauris id sapien et orci gravida luctus id ut dui. In vel vulputate odio. Duis vel turpis molestie, scelerisque enim eu, lobortis eros. Cras at ipsum gravida, sagittis ante vel, viverra tellus. Nunc mauris turpis, elementum ullamcorper nisl pretium, ultrices cursus justo. Mauris porttitor commodo eros, ac ornare orci interdum in. Cras fermentum cursus leo sed mattis. In dignissim lorem sem, sit amet elementum mauris venenatis ac.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula justo, lobortis sit amet semper vel, dignissim sit amet libero. Praesent ac tempus ligula. Maecenas at gravida odio. Etiam tristique volutpat lacus eu faucibus. Donec non tempus arcu. Phasellus adipiscing, mauris nec mollis egestas, ipsum nunc auctor velit, et rhoncus lorem ipsum at ante. Praesent et sem in velit volutpat auctor. Duis vel mauris nulla. Maecenas mattis interdum ante, quis sagittis nibh cursus et. Nulla facilisi. Morbi convallis gravida tortor, ut fermentum enim gravida et. Nunc vel dictum nisl, non ultrices libero. Proin vestibulum felis eget orci consectetur lobortis. Vestibulum augue nulla, iaculis vitae augue vehicula, dignissim ultrices libero. Sed imperdiet urna et quam ultrices tincidunt nec ac magna. Etiam vel pharetra elit.

下一页