change instace env var handling

This commit is contained in:
wryk 2021-11-05 20:36:19 +01:00
parent 8d84efeca0
commit bbc6ba5f08
3 changed files with 5 additions and 7 deletions

View File

@ -2,8 +2,8 @@ module.exports = {
plugins: {
"posthtml-expressions": {
locals: {
INSTANCE: process.env.INSTANCE
INSTANCE: process.env.INSTANCE || 'eldritch.cafe'
}
}
}
};
};

View File

@ -34,7 +34,7 @@
const cache = new DeepSet()
const domain = writableStorage(localStorage, 'domain', window.instance || 'eldritch.cafe')
const domain = writableStorage(localStorage, 'domain', window.instance)
const hashtags = writableStorage(localStorage, 'hashtags', [
'np',
@ -160,4 +160,4 @@
stickyObserver.observe(viewerEl)
})
</script>
</script>

View File

@ -17,11 +17,9 @@
<meta name="theme-color" content="#635776">
</head>
<body>
<if condition="INSTANCE">
<script>
window.instance = '{{ INSTANCE }}';
</script>
</if>
<script src="main.js"></script>
</body>
</html>
</html>