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

Support date range in footer copyright element #1821

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

chalin
Copy link
Collaborator

@chalin chalin commented Feb 3, 2024

User Guide screenshots

Wide screen:

image

Narrow screen:

image

@chalin
Copy link
Collaborator Author

chalin commented Feb 3, 2024

@emckean - what would be the right starting year for the copyright in the User Guide?

@chalin chalin force-pushed the chalin-im-copyright-range-2024-02-02 branch from 5572768 to 6589430 Compare February 4, 2024 01:13
@chalin chalin force-pushed the chalin-im-copyright-range-2024-02-02 branch from 6589430 to 76dda7c Compare February 7, 2024 09:13
@chalin chalin force-pushed the chalin-im-copyright-range-2024-02-02 branch from 76dda7c to 2206e77 Compare February 7, 2024 09:53
@chalin chalin added the enhancement New feature or request label Feb 8, 2024
@chalin chalin merged commit 29ebb03 into google:main Feb 8, 2024
11 checks passed
@chalin chalin deleted the chalin-im-copyright-range-2024-02-02 branch February 8, 2024 19:07
Comment on lines +33 to +37
{{ with .Site.Copyright -}}
<span class="td-footer__copyright">
{{- . | $page.RenderString -}}
</span>
{{- end -}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @chalin,
What’s the rationale behind this change (previously it was {{ with .Site.Copyright }}{{ . | safeHTML }}{{ end }})? I’m worried that it makes it difficult to include HTML badges like the ones generated from https://chooser-beta.creativecommons.org/.

@yann-soubeyrand
Copy link
Contributor

Hi @chalin, friendly ping as I don’t know if you received a notification for my question above?

@chalin
Copy link
Collaborator Author

chalin commented Mar 26, 2024

Thanks for the ping @yann-soubeyrand -- I'll get back to you this week before the next Docsy release :).

@yann-soubeyrand
Copy link
Contributor

Thanks!

In the meantime, I found how to achieve what I needed by putting this in my config:

copyright: |
  ++++
  Copyright Camptocamp SA
  <p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><span property="dct:title">Content</span> is licensed under <a href="http://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-SA 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1"></a></p>
  ++++

I’m using AsciiDoc and ++++ is used for pass-through blocks. I haven’t searched if it’s possible to do something similar in Markdown (maybe by allowing unsafe content in Goldmark?).

@chalin chalin mentioned this pull request Apr 7, 2024
21 tasks
@chalin
Copy link
Collaborator Author

chalin commented Apr 29, 2024

Hi @chalin, What’s the rationale behind this change (previously it was {{ with .Site.Copyright }}{{ . | safeHTML }}{{ end }})? I’m worried that it makes it difficult to include HTML badges like the ones generated from https://chooser-beta.creativecommons.org/.

@yann-soubeyrand: My rational was to make processing consistent across alternatives, but it doesn't really need to be consistent -- I can claim backwards compatibility for .Site.Copyright. That is, I'm willing to revert back to the old behavior for .Site.Copyright. How does that sound to you?

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.

Allow configuring the range of copyright years at the footer
4 participants