hugo-sandstorm/views/index.jade
JJ ade02835e4 Improved app back-end layout
I moved the publicId stuff directly in main index view to avoid an ugly iframe here which needs scrolling up and down to see all of the content.

Furthermore I added some more descriptive text and a basic formatted layout to improve readability.
2017-03-18 14:30:21 +01:00

70 lines
2.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends layout
block content
h1 Hugo
p
| Your public site is available at: 
a(href = url target = "_blank")= url
| .
- if(!isDemo)
p To set up your domain to point at your public site, add the following DNS records to your domain. Replace <code>blog.example.com</code> with your site's hostname.
table
thead
th Name
th Type
th Value
tbody
tr
td blog.example.com
td CNAME
td= domain
tr
td sandstorm-www.blog.example.com
td TXT
td= publicId
h2 Editing your site
p To check out the Git repository containing your site, first add an authorization key to Git:
iframe#gitAuthorize(style = "width: 100%; height: 25px; margin: 0; border: 0;")
p Then run the following to clone the site:
iframe#gitClone(style = "width: 100%; height: 25px; margin: 0; border: 0;")
p Here are a few pointers to help you get started:
li
| Choose a theme to make your site look nice. Hugos&nbsp;
a(href = "https://themes.gohugo.io/") theme showcase
| &nbsp;is a good place to start.
li Add the theme to your Git repository as a subtree at <code>themes/themename</code>.
li Add <code>theme = "themename"</code> to <code>Config.toml</code>.
li Push the repository, and your new site will be immediately published.
h2 Pushing existing site
p If you have an existing Hugo site, run the following to publish in this grain:
iframe#gitPush(style = "width: 100%; height: 50px; margin: 0; border: 0;")
h2 Admin interface
p
| You can do simple changes to your site directly in the&nbsp;
a(href = "/admin/") admin interface
| .
script.
document.addEventListener("DOMContentLoaded", function() {
window.parent.postMessage({renderTemplate: {
rpcId: "gitAuthorize",
template: "echo url=" + window.location.protocol + "//git:$API_TOKEN@$API_HOST | git -c credential.helper=store credential approve"
}}, "*")
window.parent.postMessage({renderTemplate: {
rpcId: "gitClone",
template: "git clone -c credential.helper=store " + window.location.protocol + "//git@$API_HOST/git site"
}}, "*")
window.parent.postMessage({renderTemplate: {
rpcId: "gitPush",
template: "git remote add origin " + window.location.protocol + "//git@$API_HOST/git\ngit push -fu origin master"
}}, "*")
})
window.addEventListener("message", function(event) {
if(event.data.error)
console.log(error)
else {
var el = document.getElementById(event.data.rpcId)
el.setAttribute("src", event.data.uri)
}
})