1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-30 19:00:32 +02:00

finished TOC feature

This commit is contained in:
Sebastian
2017-11-29 21:51:47 +01:00
parent 4bea02cb16
commit 7da2060cae
30 changed files with 605 additions and 276 deletions

View File

@@ -59,9 +59,9 @@ class Folder
$item->index = array_search('index.md', $name) === false ? false : true;
$item->order = count($nameParts) > 1 ? array_shift($nameParts) : NULL;
$item->name = implode(" ",$nameParts);
$item->name = iconv('ISO-8859-15', 'UTF-8', $item->name);
$item->name = iconv(mb_detect_encoding($item->name, mb_detect_order(), true), "UTF-8", $item->name);
$item->slug = implode("-",$nameParts);
$item->slug = URLify::filter(iconv('ISO-8859-15', 'UTF-8', $item->slug));
$item->slug = URLify::filter(iconv(mb_detect_encoding($item->slug, mb_detect_order(), true), "UTF-8", $item->slug));
$item->path = $fullPath . DIRECTORY_SEPARATOR . $key;
$item->urlRelWoF = $fullSlugWithoutFolder . '/' . $item->slug;
$item->urlRel = $fullSlugWithFolder . '/' . $item->slug;
@@ -85,9 +85,9 @@ class Folder
$item->fileType = $fileType;
$item->order = count($nameParts) > 1 ? array_shift($nameParts) : NULL;
$item->name = implode(" ",$nameParts);
$item->name = iconv('ISO-8859-15', 'UTF-8', $item->name);
$item->name = iconv(mb_detect_encoding($item->name, mb_detect_order(), true), "UTF-8", $item->name);
$item->slug = implode("-",$nameParts);
$item->slug = URLify::filter(iconv('ISO-8859-15', 'UTF-8', $item->slug));
$item->slug = URLify::filter(iconv(mb_detect_encoding($item->slug, mb_detect_order(), true), "UTF-8", $item->slug));
$item->path = $fullPath . DIRECTORY_SEPARATOR . $name;
$item->key = $iteration;
$item->keyPath = $keyPath . '.' . $iteration;