mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Favicon image setting
This commit is contained in:
parent
c445c6c162
commit
bb5916e9bc
3 changed files with 17 additions and 2 deletions
|
|
@ -180,6 +180,9 @@ default.title.format = "%page_title% - %blog_title%"
|
|||
; Default image for Open Graph
|
||||
default.image = ""
|
||||
|
||||
; Favicon image
|
||||
favicon.image = ""
|
||||
|
||||
; Set the theme here
|
||||
views.root = "themes/twentysixteen"
|
||||
|
||||
|
|
|
|||
|
|
@ -67,10 +67,16 @@ if (empty($defaultFormat)) {
|
|||
<br><br>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf(); ?>">
|
||||
<div class="form-group row">
|
||||
<label for="favicon.image" class="col-sm-2 col-form-label">Favicon Image</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="-config-favicon.image" class="form-control" id="favicon.image" value="<?php echo config('favicon.image');?>" placeholder="<?php echo site_url();?>favicon.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="default.image" class="col-sm-2 col-form-label"><?php echo i18n('default');?> Image</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="-config-default.image" class="form-control" id="default.image" value="<?php echo config('default.image');?>" placeholder="<?php echo site_url();?>resources/images/logo-big.png">
|
||||
<input type="text" name="-config-default.image" class="form-control" id="default.image" value="<?php echo config('default.image');?>" placeholder="<?php echo site_url();?>system/resources/images/logo-big.png">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
|
|
|||
|
|
@ -3421,12 +3421,18 @@ function head_contents()
|
|||
$output = '';
|
||||
$wmt_id = config('google.wmt.id');
|
||||
$version = 'HTMLy ' . constant('HTMLY_VERSION');
|
||||
$favicon = config('favicon.image');
|
||||
if (empty($favicon)) {
|
||||
$favicon = '<link rel="icon" type="image/x-icon" href="' . site_url() . 'favicon.ico" />' . "\n";
|
||||
} else {
|
||||
$favicon = '<link rel="icon" type="image/'. pathinfo($favicon, PATHINFO_EXTENSION) .'" href="' . $favicon . '" />' . "\n";
|
||||
}
|
||||
|
||||
$output .= '<meta charset="utf-8" />' . "\n";
|
||||
$output .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' . "\n";
|
||||
$output .= '<meta name="viewport" content="width=device-width, initial-scale=1" />' . "\n";
|
||||
$output .= '<meta name="generator" content="' . $version . '" />' . "\n";
|
||||
$output .= '<link rel="icon" type="image/x-icon" href="' . site_url() . 'favicon.ico" />' . "\n";
|
||||
$output .= $favicon;
|
||||
$output .= '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />' . "\n";
|
||||
$output .= '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />' . "\n";
|
||||
if (!empty($wmt_id)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue