Skip to content

Add enable option for read_more_btn #446

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

Merged
merged 4 commits into from
Oct 23, 2018
Merged

Add enable option for read_more_btn #446

merged 4 commits into from
Oct 23, 2018

Conversation

xu-song
Copy link
Contributor

@xu-song xu-song commented Oct 19, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs have been added / updated (for bug fixes / 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?

What is the new behavior?

Disable the readmore_button can make the blog more concise. Like the following case

screen shot 2018-10-20 at 12 22 22 am

  • Screens with this changes:

How to use?

In Next _config.yml:

read_more_btn: true

-->

@sli1989 sli1989 self-requested a review October 20, 2018 05:09
@Raincal Raincal self-requested a review October 20, 2018 07:02
Copy link
Collaborator

@sli1989 sli1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default value of read_more_btn should be true for the consistence.

_config.yml Outdated
@@ -264,6 +264,7 @@ save_scroll: false

# Automatically excerpt description in homepage as preamble text.
excerpt_description: true
read_more_btn: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, it's fine. sorry for the mistake.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to place after the auto_excerpt
like here

Copy link
Contributor Author

@xu-song xu-song Oct 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did as you mentioned above in the first commit.

However, I find that read_more_btn is not only related to auto_excerpt, but also post.description , post.excerpt. So I move it outside in the second commit.

Copy link
Collaborator

@sli1989 sli1989 Oct 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean excerpt_description and auto_excerpt are related to more. so place after the section of auto_excerpt without indents. not meaning of your first commit.


first excerpt description setting ,and then button setting.

Copy link
Contributor Author

@xu-song xu-song Oct 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Automatically excerpt description in homepage as preamble text.
excerpt_description: true

# Automatically Excerpt. Not recommend.
# Please use <!-- more --> in the post to control excerpt accurately.
auto_excerpt:
  enable: false
  length: 150

# Read more button, which works only in Excerpt Mode
read_more_btn: true

what about this ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it is what i mean.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which works only in Excerpt Mode seems no need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If true, the read more button would be displayed in excerpt section
I prefer like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your suggestion

@sli1989 sli1989 added this to the v6.5.0 milestone Oct 20, 2018
@sli1989 sli1989 merged commit 3e37f2f into theme-next:master Oct 23, 2018
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
* optional: disable read_more_btn

* Feat: Add enable option for read_more_btn

* update

* add comments
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.

3 participants