Skip to content

Commit

Permalink
feat: support to override css by custom .css
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Nov 27, 2022
1 parent d498443 commit 1a8a055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,9 @@ kill_old_ie:
# Assets
# In theme directory (source/css)
css: css
# In theme/hexo directory (source/css/custom.css)
# Allow user to override css.
css_custom: css/custom.css
# In theme directory (source/js)
js: js
# In theme directory (source/images)
Expand Down
3 changes: 3 additions & 0 deletions layout/_partials/head/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ if theme.post_widget.share.enable

link(rel="stylesheet" href=`${url_for(theme.css)}/index.css?v=${stun_env('version')}`)

if theme.css_custom
link(rel="stylesheet" href=theme.css_custom)

if theme.google_analytics
link(rel="dns-prefetch" href="https://www.googletagmanager.com")
if theme.baidu_analytics
Expand Down

0 comments on commit 1a8a055

Please sign in to comment.