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

Reorder head elements in base.html #6

Merged
merged 2 commits into from
Mar 2, 2024
Merged

Reorder head elements in base.html #6

merged 2 commits into from
Mar 2, 2024

Conversation

szepeviktor
Copy link
Contributor

There is a problem: in theme-detection.js things are wrapped in an IIFE, so it won't execute immediately.

@szepeviktor
Copy link
Contributor Author

... I am not sure. Maybe the opposite is true.

@szepeviktor
Copy link
Contributor Author

things are wrapped in an IIFE, so it won't execute immediately.

False!
Just tested with IIFE in a file, and a simple function call inline after that.

@szepeviktor szepeviktor marked this pull request as ready for review March 1, 2024 21:53
{% include "partial/meta.html" %}
<link rel="alternate" type="application/rss+xml" href="{{ site.url }}/feed.xml">

<script src="/js/theme-detection.js"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Meta elements above this cause no delay in execution.

@adamlaki adamlaki merged commit 8d80e49 into conedevelopment:main Mar 2, 2024
3 checks passed
@adamlaki
Copy link
Member

adamlaki commented Mar 2, 2024

Thanks Viktor, I will add these fixes to our 11ty-starter.

@szepeviktor szepeviktor deleted the patch-1 branch March 2, 2024 07:04
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.

2 participants