mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 19:46:21 +05:30
small bug fix
This commit is contained in:
parent
7c206b9c66
commit
0ef08de74c
1 changed files with 3 additions and 0 deletions
|
|
@ -1055,6 +1055,9 @@ function get_title_from_file($v)
|
|||
// Get the contents and convert it to HTML
|
||||
$content = MarkdownExtra::defaultTransform(file_get_contents($v));
|
||||
|
||||
$replaced = substr($v, 0, strrpos($v, '/')) . '/';
|
||||
$base = str_replace($replaced, '', $v);
|
||||
|
||||
// Extract the title and body
|
||||
return get_content_tag('t',$content,str_replace('-', ' ', str_replace('.md', '', $base)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue