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,7 +2,7 @@ module.exports = {
plugins: { plugins: {
"posthtml-expressions": { "posthtml-expressions": {
locals: { locals: {
INSTANCE: process.env.INSTANCE INSTANCE: process.env.INSTANCE || 'eldritch.cafe'
} }
} }
} }

View File

@ -34,7 +34,7 @@
const cache = new DeepSet() 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', [ const hashtags = writableStorage(localStorage, 'hashtags', [
'np', 'np',

View File

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