generate help URL from Wiki files

pull/116/head
Hunter Long 2018-12-19 17:16:11 -08:00
parent 3d425fd783
commit efa6892fde
3 changed files with 9 additions and 9 deletions

View File

@ -224,7 +224,7 @@ dev-deps:
$(GOCMD) install gopkg.in/matm/v1/gocov-html
$(GOCMD) get github.com/mgechev/revive
$(GOCMD) get github.com/fatih/structs
$(GOCMD) get github.com/oliveroneill/exponent-server-sdk-golang/sdk
$(GOGET) github.com/ararog/timeago
# remove files for a clean compile/build
clean:

View File

@ -41,17 +41,17 @@ func main() {
utils.Command("git clone https://github.com/hunterlong/statping.wiki.git")
pages := []string{"Types-of-Monitoring", "Features", "Start-Statping", "Linux", "Mac", "Windows", "AWS-EC2", "Docker", "Mobile-App", "Heroku", "API", "Makefile",
"Notifiers", "Notifier-Events", "Notifier-Example", "Prometheus-Exporter", "SSL", "Static-Export", "Statping-Plugins", "Statuper", "PGP-Signature", "Testing"}
"Notifiers", "Notifier-Events", "Notifier-Example", "Prometheus-Exporter", "SSL", "Config-with-.env-File", "Static-Export", "Statping-Plugins", "Statuper", "Contributing", "PGP-Signature", "Testing"}
newPages := map[string]string{}
for _, v := range pages {
compiled += "<a class=\"scrollclick\" href=\"#\" data-id=\"page_" + v + "\">" + replaceDash(v) + "</a><br>"
for k, v := range pages {
compiled += "<a class=\"scrollclick\" href=\"#\" data-id=\"page_" + utils.ToString(k) + "\">" + replaceDash(v) + "</a><br>"
}
for _, v := range pages {
for k, v := range pages {
sc, _ := ioutil.ReadFile("statping.wiki/" + v + ".md")
newPages[v] = string(sc)
compiled += "\n\n<div class=\"mt-5\" id=\"page_" + v + "\"><h1>" + replaceDash(v) + "</h1></div>\n" + string(sc)
compiled += "\n\n<div class=\"mt-5\" id=\"page_" + utils.ToString(k) + "\"><h1>" + replaceDash(v) + "</h1></div>\n" + string(sc)
}
utils.DeleteDirectory("./statping.wiki")

File diff suppressed because one or more lines are too long