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

Add an end tag at the end of the post #835

Closed
wants to merge 6 commits into from

Conversation

kimmy-wang
Copy link

@kimmy-wang kimmy-wang commented Apr 15, 2019

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 new 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?

Add an end tag at the end of the post

Issue resolved: N/A

What is the new behavior?

Add an end tag at the end of the post

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

How to use?

In NexT _config.yml:

post_end_tag:
  enable: true
  message: Thanks for reading

Does this PR introduce a breaking change?

  • Yes.
  • No.

@welcome
Copy link

welcome bot commented Apr 15, 2019

Thanks so much for opening your first PR here!

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2019

CLA assistant check
All committers have signed the CLA.

_config.yml Outdated Show resolved Hide resolved
@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Apr 15, 2019

And the docs about this feature here: https://github.com/theme-next/theme-next.org/blob/source/source/docs/theme-settings/posts.md

GitHub
The website for NexT theme. Contribute to theme-next/theme-next.org development by creating an account on GitHub.

2. Remove the hard-coded `font-size` in `post-end-tag.swig`. Let it inherit from the parent element.
stevenjoezhang
stevenjoezhang previously approved these changes Apr 15, 2019
_config.yml Outdated Show resolved Hide resolved
Copy link
Member

@Raincal Raincal left a comment

Choose a reason for hiding this comment

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

layout/_macro/post-end-tag.swig
This file should be moved to layout/_partials/post/.

@kimmy-wang
Copy link
Author

Docs updated

Copy link
Member

@ivan-nginx ivan-nginx left a comment

Choose a reason for hiding this comment

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

layout/_macro/post.swig

See by @Raincal comment above firstly.

Copy link
Author

@kimmy-wang kimmy-wang left a comment

Choose a reason for hiding this comment

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

Agree to change

@ivan-nginx
Copy link
Member

Maybe we must to refactor same feature for add custom fields anywhere. @jiangtj seems suggest something like this.

@stevenjoezhang stevenjoezhang modified the milestones: v7.1.1, 7.2.0 May 18, 2019
@1v9
Copy link
Member

1v9 commented Jun 3, 2019

Maybe we must to refactor same feature for add custom fields anywhere. @jiangtj seems suggest something like this.

@ivan-nginx Like WordPress Widgets?

@jiangtj
Copy link
Member

jiangtj commented Jul 9, 2019

#868 Hi, guy. Can you review this, does it meet your needs?

My test site: https://jiangtj.gitlab.io/next-test/muse/post/hello-world/

Theme config:

custom_file_path:
  postBodyEnd: source/_data/post-body-end.swig

In source/_data/post-body-end.swig

<div style="text-align: center; color: #ccc; font-size: 1em;">Thank you for reading</div>
Hexo
Deploy Infodeploy.jsonview raw1{"THEME_REPO":"https://github.com/jiangtj/hexo-theme-next","THEME_BRANCH":"theme-injects"} docs.jsonview raw1{"DOCS_REPO":"https://github.com/theme-next/theme-next.org",

@kimmy-wang
Copy link
Author

@jiangtj Yes, it meets my needs.

@stevenjoezhang
Copy link
Contributor

@upcwangying Thanks for your contributing. We will add this feature in #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants