Documentation ¶
Overview ¶
Package mkpage is an experiment in a light weight template and markdown processor.
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage codesnip.go - extracts code snippets from markdown ¶
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage is an experimental static site generator ¶
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage is an experiment in a light weight template and markdown processor.
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage is an experimental static site generator ¶
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage is an experimental static site generator ¶
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package mkpage ws.go provides the core library used by cmds/ws/ws.go
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- Constants
- Variables
- func BlogMetaToRSS(blog *BlogMeta, feed *rss2.RSS2) error
- func Codesnip(in io.Reader, out io.Writer, language string) error
- func ConfigFountain(config map[string]interface{}) error
- func GetPandocVersion() (string, error)
- func Grep(exp string, src string) string
- func IsDotPath(p string) bool
- func JSONGenerator(cmdExpr string, obj interface{}) error
- func LoadBlogMeta(fName string, meta *BlogMeta) error
- func MakePandoc(wr io.Writer, templateName string, keyValues map[string]string) error
- func MakePandocString(tmplSrc string, keyValues map[string]string) (string, error)
- func NormalizeDate(s string) (time.Time, error)
- func OpeningParagraphs(src string, cnt int, para string) string
- func PandocBlock(src string, from string, to string) string
- func ProcessorConfig(configType int, frontMatterSrc []byte) (map[string]interface{}, error)
- func RelativeDocPath(source, target string) string
- func RequestLogger(next http.Handler) http.Handler
- func ResolveData(data map[string]string) (map[string]interface{}, error)
- func ResponseLogger(r *http.Request, status int, err error)
- func ShowEnvironment()
- func SplitFrontMatter(input []byte) (int, []byte, []byte)
- func StaticRouter(next http.Handler) http.Handler
- func UnmarshalFrontMatter(configType int, src []byte, obj *map[string]interface{}) error
- func Walk(startPath string, filterFn func(p string, info os.FileInfo) bool, ...) error
- func WalkRSS(feed *rss2.RSS2, htdocs string, excludeList string, titleExp string, ...) error
- type BlogMeta
- type CreatorObj
- type DayObj
- type MetadataBlock
- type MonthObj
- type PostObj
- type YearObj
Constants ¶
const ( // JSONPrefix designates a string as JSON formatted content JSONPrefix = "json:" // CommonMarkPrefix designates a string as Common Mark // (a rich markdown dialect) content CommonMarkPrefix = "commonmark:" // MarkdownPrefix designates a string as Markdown (pandoc's dialect) // content MarkdownPrefix = "markdown:" // MarkdownStrict designates a strnig as John Gruber's Markdown content MarkdownStrictPrefix = "markdown_strict:" // GfmMarkdownPrefix designates a string as GitHub Flavored Markdown GfmMarkdownPrefix = "gfm:" // MMarkPrefix designates MMark format, for now this will just be passed to pandoc. MMarkPrefix = "mmark:" // TextPrefix designates a string as text/plain not needed processing TextPrefix = "text:" // FountainPrefix designates a string as Fountain formatted content FountainPrefix = "fountain:" // TextilePrefix designates source as Textile for processing by pandoc. TextilePrefix = "textile:" // ReStructureText designates source as ReStructureText for processing by pandoc ReStructureTextPrefix = "rst:" // JiraPrefix markup designates source as Jire text for processing by pandoc JiraPrefix = "jira:" // JSONGeneratorPrefix evaluates the value as a command line that // returns JSON. JSONGeneratorPrefix = "json-generator:" // DateExp is the default format used by mkpage utilities for date exp DateExp = `[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]` // BylineExp is the default format used by mkpage utilities BylineExp = (`^[B|b]y\s+(\w|\s|.)+` + DateExp + "$") // TitleExp is the default format used by mkpage utilities TitleExp = `^#\s+(\w|\s|.)+$` // FrontMatterIsUnknown means front matter and we can't parse it FrontMatterIsUnknown = iota // FrontMatterIsJSON means we have detected JSON front matter FrontMatterIsJSON // FrontMatterIsPandocMetadata means we have detected a Pandoc // style metadata block, e.g. opening lines start with // '%' attribute name followed by value(s) // E.g. // % title // % author(s) // % date FrontMatterIsPandocMetadata // FrontMatterIsYAML means we have detected a Pandoc YAML // front matter block. FrontMatterIsYAML )
const (
DateFmt = "2006-01-02"
)
const ( // LicenseText provides a string template for rendering cli license info LicenseText = `` /* 1530-byte string literal not displayed */ )
const Version = "1.0.4"
Variables ¶
var ( // Set a default -f (from) value used by Pandoc PandocFrom string // Set a default -t (to) value used by Pandoc PandocTo string )
var ( // Config holds a global config. // Uses the same structure as Front Matter in that it is // the result of parsing TOML, YAML or JSON into a // map[string]interface{} tree Config map[string]interface{} )
Functions ¶
func BlogMetaToRSS ¶ added in v0.1.1
Generate a Feed from walking the BlogMeta structure
func Codesnip ¶ added in v0.0.21
Codesnip works on io.Reader and ioWriter and string used to identified the langauge. It reads a Markdown block looking for code fenses and snips out the code to write to a file.
func ConfigFountain ¶ added in v0.0.28
ConfigFountain sets the fountain defaults then applies the map[string]interface{} overwriting the defaults returns error necessary.
func GetPandocVersion ¶ added in v0.1.1
Return the Pandoc version that will be used when calling Pandoc.
func IsDotPath ¶ added in v0.0.13
IsDotPath checks to see if a path is requested with a dot file (e.g. docs/.git/* or docs/.htaccess)
func JSONGenerator ¶ added in v0.1.2
JSONGenerator accepts command line string and executes it. It take command's output, validates that it is JSON and returns it.
func LoadBlogMeta ¶ added in v0.0.33
Reads a JSON blog meta document and popualtes a blog meta structure
func MakePandoc ¶ added in v0.0.33
MakePandoc resolves key/value map rendering metadata suitable for processing with pandoc along with template information rendering and returns an error if something goes wrong
func MakePandocString ¶ added in v0.2.0
MakePandocString resolves key/value map rendering metadata suitable for processing with pandoc along with template information rendering and returns an error if something goes wrong
func NormalizeDate ¶ added in v0.0.14
NormalizeDate takes a MySQL like date string and returns a time.Time or error
func OpeningParagraphs ¶ added in v0.1.1
OpeningParagraphs scans a Markdown file and attempts to copy the first `cnt` paragraphs ignoring GitHub image inserts. Paragraphs are scanned text followed by a delimiting character, typically that's a two new line sequence.
Example:
src, _ := ioutil.ReadFile("post.md") opening := mkpage.OpenParagraphs(fmt.Sprintf("%s", src, "\n\n"), 2)
func PandocBlock ¶ added in v0.1.1
PandocBlock will attempt to convert a src byte array from one to another formats. If conversion is successful it returns a converted string, if unsuccessful it returns the original byte array as a string.
func ProcessorConfig ¶ added in v0.0.28
ProcessorConfig takes front matter and returns a map[string]interface{} containing configuration NOTE: removed yaml, toml support as of v0.2.4 NOTE: added Pandoc Metadata block as of v0.2.5
func RelativeDocPath ¶ added in v0.0.11
RelativeDocPath calculate the relative path from source to target based on implied common base.
Example:
docPath := "docs/chapter-01/lesson-02.html" cssPath := "css/site.css" fmt.Printf("<link href=%q>\n", MakeRelativePath(docPath, cssPath))
Output:
<link href="../../css/site.css">
func RequestLogger ¶ added in v0.0.13
RequestLogger logs the request based on the request object passed into it.
func ResolveData ¶
ResolveData takes a data map and reads in the files and URL sources as needed turning the data into strings to be applied to the template.
func ResponseLogger ¶ added in v0.0.13
ResponseLogger logs the response based on a request, status and error message
func ShowEnvironment ¶ added in v1.0.3
func ShowEnvironment()
ShowEnvironent writes the contents of the environment to stdout. It is implemented so I can see the environment when mkpage is installed as a snap or in a container.
func SplitFrontMatter ¶ added in v0.0.26
SplitFrontMatter takes a []byte input splits it into front matter type, front matter source and Markdown source. If either is missing an empty []byte is returned for the missing element. NOTE: removed yaml, toml support as of v0.2.4 NOTE: Added support for Pandoc title blocks v0.2.5
func StaticRouter ¶ added in v0.0.13
StaticRouter scans the request object to either add a .html extension or prevent serving a dot file path
func UnmarshalFrontMatter ¶ added in v0.0.33
UnmarshalFrontMatter takes a []byte of front matter source and unmarshalls using only JSON frontmatter NOTE: removed yaml, toml support as of v0.2.4 NOTE: Added support for Pandoc title blocks as of v0.2.5
Types ¶
type BlogMeta ¶ added in v0.0.33
type BlogMeta struct { Name string `json:"name,omitempty"` Quip string `json:"quip,omitempty"` Description string `json:"description,omitempty"` BaseURL string `json:"url,omitempty"` Copyright string `json:"copyright,omitempty"` License string `json:"license,omitempty"` Language string `json:"language,omitempty"` Started string `json:"started,omitempty"` Ended string `json:"ended,omitempty"` Updated string `json:"updated,omitempty"` IndexTmpl string `json:"index_tmpl,omitempty"` PostTmpl string `json:"post_tmpl,omitempty"` Years []*YearObj `json:"years"` }
func (*BlogMeta) BlogAsset ¶ added in v0.1.1
BlogAsset copies a asset file to the directory as a blog post calculated from prefix and dataString. It is used by BlogIt to copy the Markdown document to the right path.
func (*BlogMeta) BlogIt ¶ added in v0.0.33
BlogIt is a tool for posting and updating a blog directory structure on local disc. It includes maintaining additional metadata resources to make it easy to script blogsites and podcast sites. @param prefix - a prefix path for the blog (relative to working dir) @param fName - the name of the file to publish to generated blog path @param dateString - A date string used to calculate the blog path, e.g.
YYYY-MM-DD maps to YYYY/MM/DD.
@returns an error type
func (*BlogMeta) RefreshFromPath ¶ added in v0.1.1
RefreshFromPath crawls the dircetory tree and rebuilds the `blog.json` file based on what is found. It takes a File extension to target (e.g. .md for Markdown) and analyzes the path for YYYY/MM/DD and transforms the information found into an entry in `blog.json`.
type CreatorObj ¶ added in v0.0.33
type MetadataBlock ¶ added in v1.0.0
type MetadataBlock struct { Title string `json:"title"` Authors []string `json:"authors"` Date string `json:"date"` }
MetadataBlock holds the Pandoc style Metadata block delimited by start '%' at the being of the line in the start of a text file.
func (*MetadataBlock) Marshal ¶ added in v1.0.0
func (block *MetadataBlock) Marshal() ([]byte, error)
func (*MetadataBlock) String ¶ added in v1.0.0
func (block *MetadataBlock) String() string
func (*MetadataBlock) Unmarshal ¶ added in v1.0.0
func (block *MetadataBlock) Unmarshal(src []byte) error
type PostObj ¶ added in v0.0.33
type PostObj struct { Slug string `json:"slug"` Document string `json:"document"` Title string `json:"title,omitempty"` SubTitle string `json:"subtitle,omitempty"` Byline string `json:"byline,omitempty"` Series string `json:"series,omitempty"` Number string `json:"number,omitempty"` Subject string `json:"subject,omitempty"` Keywords []string `json:"keywords,omitempty"` Abstract string `json:"abstract,omitempty"` Description string `json:"description,omitempty"` Category string `json:"category,omitempty"` Lang string `json:"lang,omitempty"` Direction string `json:"direction,omitempty"` Draft bool `json:"draft,omitempty"` Creators []CreatorObj `json:"creators,omitempty"` Created string `json:"date,omitempty"` Updated string `json:"updated,omitempty"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
blogit
mkpage is a thought experiment in a light weight template and markup (markdown, fountain) processing.
|
mkpage is a thought experiment in a light weight template and markup (markdown, fountain) processing. |
byline
byline reads a Markdown file and returns the first byline encountered.
|
byline reads a Markdown file and returns the first byline encountered. |
frontmatter
frontmatter.go - is a command line tool that reads a Markdown file and returns the frontmatter portion.
|
frontmatter.go - is a command line tool that reads a Markdown file and returns the frontmatter portion. |
mkpage
mkpage is a thought experiment in a light weight template and markup (markdown, fountain) processing.
|
mkpage is a thought experiment in a light weight template and markup (markdown, fountain) processing. |
mkrss
mkrss.go is a command line tool for generating an RSS file from a blog directory structure in the form of PATH_TO_BLOG/YYYY/MM/DD/BLOG_ARTICLES.html
|
mkrss.go is a command line tool for generating an RSS file from a blog directory structure in the form of PATH_TO_BLOG/YYYY/MM/DD/BLOG_ARTICLES.html |
reldocpath
reldocpath.go takes a source document path and a target document path with same base path returning a relative path to the target file.
|
reldocpath.go takes a source document path and a target document path with same base path returning a relative path to the target file. |
sitemapper
sitemapper generates a sitemap.xml file by crawling the content generate with genpages
|
sitemapper generates a sitemap.xml file by crawling the content generate with genpages |
titleline
titleine reads a Markdown file and returns the first title encountered.
|
titleine reads a Markdown file and returns the first title encountered. |
urldecode
urldecode.go is a simple command line utility to decode a string in a URL friendly way.
|
urldecode.go is a simple command line utility to decode a string in a URL friendly way. |
urlencode
urlencode.go is a simple command line utility to encode a string in a URL friendly way.
|
urlencode.go is a simple command line utility to encode a string in a URL friendly way. |
ws
ws.go - A simple web server for static files.
|
ws.go - A simple web server for static files. |