mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
markdown: Don't generate static site or links unless sitegen is enabled
This commit is contained in:
parent
b6078eded1
commit
09341fca12
1 changed files with 10 additions and 10 deletions
|
@ -17,6 +17,8 @@ import (
|
|||
// It only generates static files if it is enabled (cfg.StaticDir
|
||||
// must be set).
|
||||
func GenerateStatic(md Markdown, cfg *Config) error {
|
||||
// If static site generation is enabled.
|
||||
if cfg.StaticDir != "" {
|
||||
generated, err := generateLinks(md, cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -27,8 +29,6 @@ func GenerateStatic(md Markdown, cfg *Config) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// If static site generation is enabled.
|
||||
if cfg.StaticDir != "" {
|
||||
if err := generateStaticHTML(md, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue