diff --git a/lib/web/sitegen/play.v b/lib/web/sitegen/play.v index 2ebd9f80..5eaf1635 100644 --- a/lib/web/sitegen/play.v +++ b/lib/web/sitegen/play.v @@ -66,7 +66,7 @@ pub fn play(args_ PlayArgs) ! { mut position := 0 mut path:="" for action in page_actions { - println(action) + // println(action) mut p := action.params sitename := p.get_default('sitename',args.sitename)! pathnew := p.get_default('path', "")! diff --git a/lib/web/sitegen/site.v b/lib/web/sitegen/site.v index 9204b230..ffefb765 100644 --- a/lib/web/sitegen/site.v +++ b/lib/web/sitegen/site.v @@ -49,6 +49,15 @@ pub fn (mut site Site) page_add(args_ Page) ! { args.description = page_name } } + + if args.title.len==0 { + descnew:=markdowntools.extract_title(page_content) + if descnew!=""{ + args.title = descnew + }else{ + args.title = page_name + } + } content<< "title: '${args.title}'" if args.description.len>0 {