Add node-copy thing config

This commit is contained in:
Tom 2023-11-09 16:42:28 +00:00
parent 0464c322b8
commit d97af352f6
7 changed files with 29 additions and 7 deletions

View File

@ -17,6 +17,17 @@ collections:
projects:
output: true
node_modules:
modules_dir: node_modules
assets:
js: assets/js
css: assets/css
copy:
- source: three/
target: assets/js/three/
- source: es-module-shims/
target: assets/js/es-module-shims/
plugins:
- jekyll-feed

View File

@ -0,0 +1,11 @@
---
title: Notes on building this site
layout: post
excerpt: |
Mostly a note to self so that I can check this when I forget late how it works.
---
The site is build by a github action based on the [jekyll recommendation](https://jekyllrb.com/docs/continuous-integration/github-actions/). I did this because I wanted to be able to use `npm install` like all the cool kids which lead to adding [jekyll-node-module](https://github.com/mintbit/jekyll-node-module#jekyll-node-module) to the site to be able to copy things in from `node_packages` without committing it all to the repo.
The 3D outline rendered images on the [projects pages](/projects) are done with code from [Omaha Shehata](https://omar-shehata.medium.com/better-outline-rendering-using-surface-ids-with-webgl-e13cdab1fd94).

View File

@ -13,18 +13,17 @@ social_image: /assets/projects/bike_lights/thumbnail.png
model: /assets/projects/bike_lights/model
head: |
<script async src="https://unpkg.com/es-module-shims@1.8.0/dist/es-module-shims.js"></script>
<script async src="/assets/js/es-module-shims/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.156.1/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.156.1/examples/jsm/",
"three": "/assets/js/three/build/three.module.min.js",
"three/addons/": "/assets/js/three/examples/jsm/",
"dat.gui": "https://unpkg.com/dat.gui@0.7.9/build/dat.gui.module.js"
}
}
</script>
<script src="/assets/js/three/index.js" type="module"></script>
<script src="/assets/js/outline-model-viewer/index.js" type="module"></script>
---
<outline-model-viewer model = "/assets/projects/bike_lights/models/bigger.glb">
@ -33,4 +32,3 @@ head: |
</outline-model-viewer>
<img src = "/assets/projects/bike_lights/bike_light.jpg">

View File

@ -1,5 +1,7 @@
{
"dependencies": {
"mathjax": "^3.2.2"
"es-module-shims": "^1.8.1",
"mathjax": "^3.2.2",
"three": "^0.158.0"
}
}