summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-06 11:37:24 -0400
committerpommicket <pommicket@gmail.com>2023-09-06 11:44:36 -0400
commita06deaf3c9397d4f6b1697c3333e6bf13309fcd1 (patch)
tree6971caa7b090193840aa8671f8c36d25d5c3497c
parent8d16e2d14ea9dafaea0af6c357ce1c09fefa0fde (diff)
deploying
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rw-r--r--index.html6
-rw-r--r--pugl.js3
4 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 10de838..5e7ed55 100644
--- a/Makefile
+++ b/Makefile
@@ -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/
diff --git a/README.md b/README.md
index b06dcc5..435fa46 100644
--- a/README.md
+++ b/README.md
@@ -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/).
diff --git a/index.html b/index.html
index 4369b6e..5e3fc53 100644
--- a/index.html
+++ b/index.html
@@ -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>
diff --git a/pugl.js b/pugl.js
index 7361fdb..76796db 100644
--- a/pugl.js
+++ b/pugl.js
@@ -2391,7 +2391,10 @@ function load_most_recent_or_create_new() {
load = id;
}
}
+ } else {
+ creation_metadata = {};
}
+
if (load) {
load_creation(load);
} else {