mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 11:36:20 +05:30
Improve blog
This commit is contained in:
parent
96ce3816ee
commit
a99b71ef07
2 changed files with 6 additions and 3 deletions
|
|
@ -10,6 +10,9 @@ blog.tagline = "Just another HTMLy blog"
|
||||||
blog.description = "Proudly powered by HTMLy, a databaseless blogging platform."
|
blog.description = "Proudly powered by HTMLy, a databaseless blogging platform."
|
||||||
blog.copyright = "(c) Your name."
|
blog.copyright = "(c) Your name."
|
||||||
|
|
||||||
|
; Show the /blog url as the blog homepage
|
||||||
|
blog.enable = "false"
|
||||||
|
|
||||||
; Social account
|
; Social account
|
||||||
social.twitter = "https://twitter.com"
|
social.twitter = "https://twitter.com"
|
||||||
social.facebook = "https://www.facebook.com"
|
social.facebook = "https://www.facebook.com"
|
||||||
|
|
|
||||||
|
|
@ -1477,12 +1477,12 @@ function generate_rss($posts)
|
||||||
if (!empty($rssLength)) {
|
if (!empty($rssLength)) {
|
||||||
if (strlen(strip_tags($p->body)) < config('rss.char')) {
|
if (strlen(strip_tags($p->body)) < config('rss.char')) {
|
||||||
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
||||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '">more</a>';
|
$body = $string . '...';
|
||||||
} else {
|
} else {
|
||||||
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
||||||
$string = substr($string, 0, config('rss.char'));
|
$string = substr($string, 0, config('rss.char'));
|
||||||
$string = substr($string, 0, strrpos($string, ' '));
|
$string = substr($string, 0, strrpos($string, ' '));
|
||||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '">more</a>';
|
$body = $string . '...';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$body = $p->body;
|
$body = $p->body;
|
||||||
|
|
@ -1795,7 +1795,7 @@ function Zip($source, $destination, $include_dir = false)
|
||||||
function is_index()
|
function is_index()
|
||||||
{
|
{
|
||||||
$req = $_SERVER['REQUEST_URI'];
|
$req = $_SERVER['REQUEST_URI'];
|
||||||
if (strpos($req, '/archive/') !== false || strpos($req, '/tag/') !== false || strpos($req, '/search/') !== false || $req == site_path() . '/' || strpos($req, site_path() . '/?page') !== false) {
|
if (strpos($req, '/archive/') !== false || strpos($req, '/tag/') !== false || strpos($req, '/search/') !== false || strpos($req, '/blog') !== false || $req == site_path() . '/' || strpos($req, site_path() . '/?page') !== false) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue