...
This commit is contained in:
@@ -66,7 +66,7 @@ pub fn play(args_ PlayArgs) ! {
|
|||||||
mut position := 0
|
mut position := 0
|
||||||
mut path:=""
|
mut path:=""
|
||||||
for action in page_actions {
|
for action in page_actions {
|
||||||
println(action)
|
// println(action)
|
||||||
mut p := action.params
|
mut p := action.params
|
||||||
sitename := p.get_default('sitename',args.sitename)!
|
sitename := p.get_default('sitename',args.sitename)!
|
||||||
pathnew := p.get_default('path', "")!
|
pathnew := p.get_default('path', "")!
|
||||||
|
|||||||
@@ -49,6 +49,15 @@ pub fn (mut site Site) page_add(args_ Page) ! {
|
|||||||
args.description = page_name
|
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}'"
|
content<< "title: '${args.title}'"
|
||||||
|
|
||||||
if args.description.len>0 {
|
if args.description.len>0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user