You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lensfrex
79e56ca7db
|
1 year ago | |
---|---|---|
.github | 1 year ago | |
scaffolds | 1 year ago | |
source | 1 year ago | |
themes | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
_config.yml | 1 year ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago |
README.md
Hexo Theme Unit Test
This is a dummy Hexo site for theme unit test. You should test your theme before release.
This test doesn't contain the default theme. You have to install the theme you want to test before starting.
Usage
-
Clone this repository
$ git clone https://github.com/hexojs/hexo-theme-unit-test.git
-
Install your own theme and modify
theme
setting in_config.yml
. -
Run server and start testing. Make sure all styles are displayed properly.
-
Once test is done, you can submit your theme!
Checklist
<head>
-
Use the proper DOCTYPE. If you don't know which doctype you should use,
<!DOCTYPE html>
is recommended. -
UTF8 charset
<meta charset="utf-8">
-
Proper titles for different pages
-
Favicon support
<link rel="icon" href="path/of/favicon">
Index
- Only display excerpts. (Better with a "Read More" link)
- Pagination
Post
- Display post categories and tags.
- Disqus comment support.
- Display the post date.
- Support
photo
andlink
layout. - Posts without title should be accessible.
Performance
- Use fragment_cache It caches render result across post/pages, see #1769 for the impact
Optional
- Responsive design
- i18n
- Post share
- SEO
- RSS Autodiscovery support
- Example:
<link rel="alternate" href="path/of/rss" type="application/atom+xml">
- Some RSS plugins (e.g. hexo-generator-feed 2.1+) insert autodiscovery by default. There is a slight performance benefit if a theme inserts it, instead of the plugin. To take advantage of that, autodiscovery needs to be disabled in the plugin.
feed: autodiscovery: false
- hexo-generator-feed plugin could generate more than one type of RSS (e.g. Atom & RSS2). Here is an example EJS snippet for multi-format support by utilizing
feed_tag
helper:<%- feed_tag() %>
- If you want to support other plugins, in addition to hexo-generator-feed:
<% if (config.feed) { %> <%- feed_tag() %> <% } else if (theme.rss) { %> <%- feed_tag(theme.rss) %> <% } %>
- If you decide to support autodiscovery, we recommend checking the updates of hexo-generator-feed (or any other RSS plugin that your theme prefers) from time to time. The configuration and functionality of an RSS plugin may change over time.