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

feat: re-format copyright message and auto increase copyright end year based on the current year #46

Merged
merged 3 commits into from
Jun 29, 2021

Conversation

Anthonyive
Copy link
Contributor

Simple explanation:

Screen Shot 2021-06-25 at 12 52 02 AM

copyright: GitHub User
copyright_start_date: 2017
copyright_end_date: 2020
copyright_auto_increase: false 
# if set to true, the copyright end date will be overwritten and auto increased

@jeffreytse
Copy link
Owner

Hi @Anthonyive

Firstly, thanks for the PR on auto updating the copyright period. For the year of copyright, I don't recommend to use a third-party gem, could you refactor it and implement it by the placeholder parameter?

For example:

copyright: "(c)copyright 2017-{currentYear}"

Thanks and regards

@jeffreytse jeffreytse self-assigned this Jun 28, 2021
@jeffreytse jeffreytse added the enhancement New feature or request label Jun 28, 2021
Copy link
Owner

@jeffreytse jeffreytse left a comment

Choose a reason for hiding this comment

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

The implement of auto increasing copyright period on the current year should be better simplified.

@Anthonyive
Copy link
Contributor Author

Anthonyive commented Jun 28, 2021

@jeffreytse I will remove that gem. That gem was not used for the code. It was just for the local server to work properly since I was using ruby 3.0

@Anthonyive
Copy link
Contributor Author

Thanks for the suggestions! I will look into them.

@Anthonyive
Copy link
Contributor Author

Anthonyive commented Jun 28, 2021

New implementation based on copyright.gov:

Write _config.yml like this:

copyright: "Unpublished Work (cleft) 2017-{currentYear} {author}"
  • {currentYear} will be replaced with current year
  • {author} will be replaced with site.author
  • copyright symbol
    • copyright: © - (c)
    • copyleft: (cleft)
    • sound recording copyright: ℗ - (p)

Copy link
Owner

@jeffreytse jeffreytse left a comment

Choose a reason for hiding this comment

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

Thanks for the work, and this implement has almost reached the goal.

@jeffreytse jeffreytse merged commit b3e6ee2 into jeffreytse:master Jun 29, 2021
shahbaz22 pushed a commit to shahbaz22/resonance-site that referenced this pull request Nov 17, 2024
* feat: re-format copyright message and auto increase current year

* docs: add comment for copyright setting

This comment is crucial, especially for newcomers.

* refactor: better liquid code format

Co-authored-by: jeffreytse <[email protected]>
jnooree pushed a commit to jnooree/jnooree.github.io that referenced this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants