zola-app/public/index.html

34 lines
1.0 KiB
HTML

<html>
<head>
<title>Zola</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
<h1>Zola</h1>
<p>To get started, fill in the repository URL in <code>/app/data/config.sh</code>.</p>
<button onclick="rebuild()">Rebuild now</button>
<h2>Webhook</h2>
<p>
To trigger a site rebuild from a webhook, use the following URL:
</p>
<pre><code id="webhook_url"></code></pre>
<p>
If you want to clone a protected repository, you can grant access to the following SSH key:
</p>
<pre><code>%SSH_KEY%</code></pre>
<script>
var token = "%TOKEN%";
var url = `https://token:${token}@${window.location.hostname}/_rebuild`;
function rebuild() {
var xhr = new XMLHttpRequest();
xhr.open("POST", url, false);
xhr.send();
alert("Rebuild started");
}
document.getElementById('webhook_url').innerHTML = url;
</script>
</body>
</html>