From d97af352f6c2b649349941ff8d07d02dc2dcffd7 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 9 Nov 2023 16:42:28 +0000 Subject: [PATCH] Add node-copy thing config --- _config.yml | 11 +++++++++++ _posts/2023-11-9-this-site.md | 11 +++++++++++ _projects/bike_lights.md | 10 ++++------ .../CustomOutlinePass.js | 0 .../{three => outline-model-viewer}/FindSurfaces.js | 0 assets/js/{three => outline-model-viewer}/index.js | 0 package.json | 4 +++- 7 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 _posts/2023-11-9-this-site.md rename assets/js/{three => outline-model-viewer}/CustomOutlinePass.js (100%) rename assets/js/{three => outline-model-viewer}/FindSurfaces.js (100%) rename assets/js/{three => outline-model-viewer}/index.js (100%) diff --git a/_config.yml b/_config.yml index bbbecd7..e07a0d1 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_posts/2023-11-9-this-site.md b/_posts/2023-11-9-this-site.md new file mode 100644 index 0000000..4848a3c --- /dev/null +++ b/_posts/2023-11-9-this-site.md @@ -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). \ No newline at end of file diff --git a/_projects/bike_lights.md b/_projects/bike_lights.md index 55f81a8..7e4b3b8 100644 --- a/_projects/bike_lights.md +++ b/_projects/bike_lights.md @@ -13,18 +13,17 @@ social_image: /assets/projects/bike_lights/thumbnail.png model: /assets/projects/bike_lights/model head: | - - + - + --- @@ -33,4 +32,3 @@ head: | - diff --git a/assets/js/three/CustomOutlinePass.js b/assets/js/outline-model-viewer/CustomOutlinePass.js similarity index 100% rename from assets/js/three/CustomOutlinePass.js rename to assets/js/outline-model-viewer/CustomOutlinePass.js diff --git a/assets/js/three/FindSurfaces.js b/assets/js/outline-model-viewer/FindSurfaces.js similarity index 100% rename from assets/js/three/FindSurfaces.js rename to assets/js/outline-model-viewer/FindSurfaces.js diff --git a/assets/js/three/index.js b/assets/js/outline-model-viewer/index.js similarity index 100% rename from assets/js/three/index.js rename to assets/js/outline-model-viewer/index.js diff --git a/package.json b/package.json index c74898c..e642d0b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,7 @@ { "dependencies": { - "mathjax": "^3.2.2" + "es-module-shims": "^1.8.1", + "mathjax": "^3.2.2", + "three": "^0.158.0" } }