#2: Add instructions for publishing an existing site. Use 'git push -f' to override a soon-to-be-added default site.

This commit is contained in:
Nolan Darilek 2017-03-13 16:27:15 -05:00
parent b2d22463b9
commit 473cc84fe5

View File

@ -5,8 +5,10 @@ block content
iframe(src = "/publicId" style = "width: 100%; margin: 0; border: 0;") iframe(src = "/publicId" style = "width: 100%; margin: 0; border: 0;")
p To check out the Git repository containing your site, first add an authorization key to Git: p To check out the Git repository containing your site, first add an authorization key to Git:
iframe#gitAuthorize(style = "width: 100%; height: 55px; margin: 0; border: 0;") iframe#gitAuthorize(style = "width: 100%; height: 55px; margin: 0; border: 0;")
p Then run the following: p Then run the following to start with a fresh site:
iframe#gitClone(style = "width: 100%; height: 55px; margin: 0; border: 0;") iframe#gitClone(style = "width: 100%; height: 55px; margin: 0; border: 0;")
p If you have an existing Hugo site, run the following to publish in this grain:
iframe#gitPush(style = "width: 100%; height: 55px; margin: 0; border: 0;")
a(href = "/admin/") Administer a(href = "/admin/") Administer
script. script.
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
@ -18,6 +20,10 @@ block content
rpcId: "gitClone", rpcId: "gitClone",
template: "git clone -c credential.helper=store " + window.location.protocol + "//git@$API_HOST/git site" 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) { window.addEventListener("message", function(event) {
if(event.data.error) if(event.data.error)