Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor several components in _config.yml #965

Merged
merged 16 commits into from
Jul 13, 2019
Merged

Refactor several components in _config.yml #965

merged 16 commits into from
Jul 13, 2019

Conversation

stevenjoezhang
Copy link
Contributor

@stevenjoezhang stevenjoezhang commented Jul 11, 2019

Breaking change

Deleted:
avatar.opacity
codeblock.border_radius

Renamed:
highlight_theme -> codeblock.highlight_theme
custom_logo.image -> custom_logo
pace_theme -> pace.theme

avatar:
-  opacity: 1

-highlight_theme: normal
codeblock:
+  highlight_theme: normal
-  border_radius:

-custom_logo:
-  enable: false
-  image: #/uploads/custom-logo.jpg
+custom_logo: #/uploads/custom-logo.jpg

-pace: false
-pace_theme: pace-theme-minimal
+pace:
+  enable: false
+  theme: minimal

In _config.yml, avatar.opacity and codeblock.border_radius only changes the style of one particular class of elements.
As a result of #868, creating custom css is unprecedented in simplicity. These options should be removed and users can use custom css instead.
Besides, codeblock.border_radius should follow codeblock.copy_button.style

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes was maked (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs in NexT website have been added / updated (for features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

Issue resolved: #299

What is the new behavior?

  • Screenshots with this changes: N/A
  • Link to demo site with this changes: N/A

How to use?

In NexT _config.yml:

...

Does this PR introduce a breaking change?

  • Yes.
  • No.

@stevenjoezhang stevenjoezhang changed the title Remove some options that can be controlled by custom css in _config.yml Refactor several components in _config.yml Jul 11, 2019
@sli1989
Copy link
Collaborator

sli1989 commented Jul 23, 2019

  1. how to set codeblock.border_radius according to highlight.styl?
  2. about avatar.opacity, this also should be reset?
    opacity: hexo-config('avatar.opacity') is a 'unit' ? hexo-config('avatar.opacity') : 1;

@stevenjoezhang
Copy link
Contributor Author

About the second question, it has already been reset. You can check the master branch.

@sli1989
Copy link
Collaborator

sli1989 commented Jul 23, 2019

oh, thanks. but how to custom these two css for xiaobai. 😢

@stevenjoezhang
Copy link
Contributor Author

Add this to _data/styles.styl:

.site-author-image {
 opacity: 0.7;
}

@ivan-nginx
Copy link
Member

Add this to _data/styles.styl:

.site-author-image {
 opacity: 0.7;
}

Answers like that must be documented in site for around excess questions.

@1v9
Copy link
Member

1v9 commented Aug 4, 2019

@ivan-nginx FAQ?

@stevenjoezhang
Copy link
Contributor Author

See also theme-next/theme-next.org#36

@ivan-nginx
Copy link
Member

@ivan-nginx FAQ?

Yep.

tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

使用tomorrow-theme高亮代码, highlight-selection不起作用
4 participants