Markdown: Modify development mode to generate links on page requests.

This commit is contained in:
Abiola Ibrahim
2015-08-05 00:41:04 +01:00
parent 851026d3fa
commit 2ab466599d
5 changed files with 37 additions and 37 deletions

View File

@ -79,6 +79,7 @@ func (l *linkGen) generateLinks(md Markdown, cfg *Config) {
if _, err := os.Stat(fp); os.IsNotExist(err) {
l.Lock()
l.lastErr = err
l.generating = false
l.Unlock()
return
}
@ -87,6 +88,9 @@ func (l *linkGen) generateLinks(md Markdown, cfg *Config) {
// same hash, return.
if err == nil && hash == cfg.linksHash {
l.Lock()
l.generating = false
l.Unlock()
return
} else if err != nil {
log.Println("Error:", err)