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 localtime template tag #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add localtime template tag #39

wants to merge 1 commit into from

Conversation

danlamanna
Copy link
Contributor

Fixes #37

This requires adding the time-elements script (https://github.com/github/time-elements) to the pages this is used on.

Copy link
Contributor

@brianhelba brianhelba left a comment

Choose a reason for hiding this comment

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

Can you rebase this branch? CI was broken previously.


Regarding:

This requires adding the time-elements script (github/time-elements) to the pages this is used on.

At a minimum, this needs to be documented in the localtime docstring.

However, I think we need to provide more support for downstreams to use this library. How about a second template tag, which could be used within the page <head>, to add the appropriate <script>?

@zachmullen
Copy link
Contributor

zachmullen commented Dec 19, 2023

I'd love for this to be upstreamed and agree with @brianhelba 's suggestion of an additional template tag to include the JS.

@zachmullen
Copy link
Contributor

zachmullen commented Dec 19, 2023

This is a working incantation for getting the library from CDN:

<script type="module" src="https://cdn.jsdelivr.net/npm/@github/[email protected]/+esm"></script>

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

Successfully merging this pull request may close these issues.

Add a template tag to render local time
3 participants