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

Allow adding extra attributes to scripts #2613

Closed
wants to merge 1 commit into from
Closed

Allow adding extra attributes to scripts #2613

wants to merge 1 commit into from

Conversation

moetayuko
Copy link
Contributor

This is an enhancement or feature.

Summary

site.footer_scripts is not enough in case we wanna defer or
asynchronously load custom scripts

Context

#2575

site.footer_scripts is not enough in case we wanna defer or
asynchronously load custom scripts.

Co-authored-by: Michael Rose <[email protected]>
@iBug
Copy link
Collaborator

iBug commented Jul 24, 2020

I wonder if there's a way to keep the compatibility with the status quo. This is a breaking change so it'd be better if there's a "transition period".

Also, your implementation of inlined site.footer_scripts doesn't match that of your updated documentation. With

{% if site.footer_scripts %}
  {% for script in site.footer_scripts %}
    {% unless script.inline %}

The config should have been like this:

footer_scripts:
  - inline: "whatever"

Perhaps you wanted it like this:

{% if site.footer_scripts %}
  {% if site.footer_scripts.inline %}
  {% else %}
    {% for script in site.footer_scripts %}

@stale
Copy link

stale bot commented Aug 23, 2020

This issue has been automatically marked as stale because it has not had recent activity.

If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.

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