blog/themes/chameleon/README.md

57 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2019-09-15 18:09:38 +00:00
# Chameleon theme
Chameleon is a fork of [Typing](https://github.com/geekplux/hexo-theme-typing) theme, rewrote from scratch with the following changes/features:
- [sanitize.css](https://github.com/csstools/sanitize.css/) and [autoprefixer](https://github.com/csstools/sanitize.css/) for consistent cross-browser styling.
- Utilise [relative length](https://www.w3schools.com/CSSref/css_units.asp) instead of absolute length in the css.
- [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) to apply light/dark theme according to the OS preference.
- Add a [Copy](https://clipboardjs.com/) button to each code block.
- Removed jQuery, fancyBox, web analytics, comment plugins, donation links and [typo.css](https://github.com/sofish/typo.css).
- Homepage shows index of posts (same as /archives).
2020-08-10 08:29:36 +00:00
## Options
Configure this theme from your **site**'s configuration:
``` yml
# _config.yml
theme_config:
# Header menu
menu:
Home: /
Archives: /archives/
Feed: /atom.xml
# Footer menu
footer:
GitLab: https://gitlab.com/curben/blog
# Load forkawesome icons?
icons: false
```
2020-08-15 13:26:27 +00:00
## Codeblock highlight
Following configurations need to be updated.
``` yml
# _config.yml
highlight:
enable: true
line_number: false
hljs: true
wrap: false
prismjs:
enable: false
```
2020-08-15 13:26:27 +00:00
## Build
Build "source/css/_source.css" into "source/css/chameleon.css"
```
$ npm install
$ npm run build
```