mirror of
https://github.com/danpros/htmly.git
synced 2026-04-21 13:06:22 +05:30
Add markdown editor
Add markdown editor so anyone can test it. Fix explode on tags.
This commit is contained in:
parent
8c685f9d68
commit
e829ae974f
22 changed files with 4398 additions and 5 deletions
|
|
@ -207,11 +207,16 @@ function get_tag($tag, $page, $perpage){
|
|||
|
||||
foreach ($posts as $index => $v) {
|
||||
$url = $v['filename'];
|
||||
if( strpos($url, "$tag") !== false){
|
||||
$str = explode('_', $url);
|
||||
if($tag === $str[1]){
|
||||
$tmp[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($tmp)) {
|
||||
not_found();
|
||||
}
|
||||
|
||||
return $tmp = get_posts($tmp, $page, $perpage);
|
||||
|
||||
}
|
||||
|
|
@ -225,11 +230,16 @@ function get_archive($req, $page, $perpage){
|
|||
|
||||
foreach ($posts as $index => $v) {
|
||||
$url = $v['filename'];
|
||||
if( strpos($url, "$req") !== false){
|
||||
$str = explode('_', $url);
|
||||
if( strpos($str[0], "$req") !== false ){
|
||||
$tmp[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($tmp)) {
|
||||
not_found();
|
||||
}
|
||||
|
||||
return $tmp = get_posts($tmp, $page, $perpage);
|
||||
|
||||
}
|
||||
|
|
@ -890,9 +900,6 @@ function get_static_path(){
|
|||
|
||||
$tmp = array();
|
||||
|
||||
// Create a new instance of the markdown parser
|
||||
$md = new MarkdownParser();
|
||||
|
||||
foreach($posts as $index => $v){
|
||||
|
||||
$post = new stdClass;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue