mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
fix blog posts starting with numbers
This commit is contained in:
parent
e06383708d
commit
acc9f4cfe7
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Post
|
|||
$category = $pathTokens[count($pathTokens) - 2];
|
||||
$filename = $pathTokens[count($pathTokens) - 1];
|
||||
$isRelative = $relativeOrAbsolutePath[0] != '/';
|
||||
$slug = static::getSlugFromFilename($filename);
|
||||
$slug = strpos($filename, '.md') !== false ? static::getSlugFromFilename($filename) : $filename;
|
||||
$path = ($isRelative ? ROOT_DIR . '/posts/' : '') .
|
||||
$relativeOrAbsolutePath .
|
||||
(substr($filename, -3) !== '.md' ? '.md' : '');
|
||||
|
|
Loading…
Add table
Reference in a new issue