diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | index.html | 6 | ||||
-rw-r--r-- | pugl.js | 3 |
4 files changed, 15 insertions, 2 deletions
@@ -2,7 +2,11 @@ public-target: guide-target rm -rf public mkdir public cp -r guide public - cp index.html style.css pugl.js move.svg x.svg favicon.ico public/ + cp index.html icon.png style.css pugl.js move.svg x.svg favicon.ico public/ guide-target: python3 guide-src/make.py + +deploy: public-target + @[ `git diff HEAD | wc -c` = 0 ] || { echo 'there are uncommitted changes; please commit them first'; exit 1; } + rclone --s3-acl=public-read --transfers 16 --checkers 16 -P sync public/ linode://s.pommicket.com/pugl/ @@ -4,4 +4,4 @@ online shader thingamabob the main files of interest are `index.html` and `pugl.js`. -for more information, check out the guide. +for more information, check out the [guide](https://s.pommicket.com/pugl/guide/). @@ -5,6 +5,12 @@ <title>pugl</title> <meta charset="utf-8"> <meta content="width=device-width,initial-scale=1" name="viewport"> + <script> + // make sure we have the right base for URLs + if (!location.href.endsWith('.html') && !location.href.endsWith('/')) { + location.href = location.href + '/'; + } + </script> <link rel="icon" href="favicon.ico"> <link rel="stylesheet" href="style.css"> </head> @@ -2391,7 +2391,10 @@ function load_most_recent_or_create_new() { load = id; } } + } else { + creation_metadata = {}; } + if (load) { load_creation(load); } else { |