diff --git a/GitHubPages.asciidoc b/GitHubPages.asciidoc new file mode 100644 index 0000000..d69508a --- /dev/null +++ b/GitHubPages.asciidoc @@ -0,0 +1,33 @@ +#### Building and publishing docs on GitHub Pages + +A script build your project documentation and publish it on GitHub pages. Replace "main_fname". + +Caution: the script will commit and publish every html file in the project directory. + +[source,nim] +---- +#!/usr/bin/env nim +mode = ScriptMode.Verbose +import strutils +let main_fname = "REPLACE_ME.nim" + +var author_name, proj_name = "" +let git_orig = static_exec "git remote show origin -n" +for line in git_orig.splitlines: + if line.contains "Push URL:": + assert line.contains "github.com" + (author_name, proj_name) = line.split(':')[2].split('/') + proj_name = proj_name[0..