Make a head yaml key to add custom js imports to pages

This commit is contained in:
Tom 2023-09-08 13:08:34 +01:00
parent 6b60ed6654
commit 35c0acefbb
7 changed files with 11 additions and 4 deletions

View File

@ -46,9 +46,6 @@ See: https://developers.google.com/search/docs/advanced/mobile/google-discover?h
<link rel="stylesheet" href="/assets/css/styles.css">
<script src="/assets/js/index.js"></script>
<script type="module" src="/assets/js/model-viewer.js"></script>
<script>
MathJax = {
tex: {
@ -62,4 +59,8 @@ See: https://developers.google.com/search/docs/advanced/mobile/google-discover?h
<script src="/assets/mathjax/tex-mml-svg.js" id="MathJax-script" async></script>
<!-- RSS feed -->
{% feed_meta %}
{% feed_meta %}
{% if page.head %}
{{ page.head }}
{% endif %}

View File

@ -6,6 +6,7 @@ image: /assets/blog/shelves/thumb.svg
social_image: /assets/social/shelves.png
alt: A 3D render of some shelves fitting into a triangular space under a ladder.
assets: /assets/blog/shelves
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
<figure>

View File

@ -7,6 +7,7 @@ commentid: 110810437631337327
hide_image: true # Only use this image for static previews
social_image: /assets/social/pcb_1.png
alt: A 3D render of a simple PCB.
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
I made my first PCB!

View File

@ -6,6 +6,7 @@ layout: post
hide_image: true # Only use this image for static previews
image: /assets/blog/toothbrush_shelf/spin.gif
alt: A render of a 3D printed shelf sitting above a shaver outlet, it spins slowly.
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
It can be hard to find genuine everyday uses of 3D printing, but after a while you do find some! I made this little shelf to tidy up the wires to our devices in the bathroom. The wires are now hidden, coiled up, inside the shelf.

View File

@ -5,6 +5,7 @@ excerpt: |
I want to make some really big laser etched maps.
image: /assets/blog/maps/tests.jpeg
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
There's something fascinating about maps. I particularly love how they have this kind of fractal level of detail as you zoom in and out. Look at this one, I really like the minimalist black and white design.

View File

@ -6,6 +6,7 @@ excerpt: |
image: /assets/blog/weekend_builds_1/stool.jpeg
assets: /assets/blog/weekend_builds_1/
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
Here's a quick one, using the aforementioned massive lasercutter at my makerspace, I made this little pot stand out of lasercut ply.

View File

@ -4,6 +4,7 @@ layout: default
permalink: /
redirect_from:
- /blog/
head: <script type="module" src="/assets/js/model-viewer.js"></script>
---
{% for post in site.posts %}
<article class="h-entry">