Enable sitename and tagline in _blogs and _pages

This commit is contained in:
Stig-Ørjan Smelror 2024-02-03 09:16:43 +01:00
parent 0d2584c512
commit 1707faf822
7 changed files with 33 additions and 57 deletions

13
qsgen2
View File

@ -410,6 +410,10 @@ function _pages() {
if (${debug}) _msg debug "_pages: Replacing tagline"
local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#tagline|${site_tagline}|gs" )
# Replace every #sitename in pages_tpl
if (${debug}) _msg debug "_pages: Replacing sitename"
local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#sitename|${site_name}|gs" )
# Replace #updated with today's date and #version with Name and Version to footer
if (${debug}) _msg debug "_pages: _last_updated in pages_tpl"
local pages_tpl=$( _last_updated ${pages_tpl} )
@ -528,6 +532,15 @@ function _blogs() {
elif [[ ${file_ext} == "md" ]]; then
local blog_content=$(echo "$blog_content" | ${engine})
fi
# Replace every #tagline in blog_content
if (${debug}) _msg debug "_blogs: Replacing tagline"
local blog_content=$( echo ${blog_content} | perl -pe "s|#tagline|${site_tagline}|gs" )
# Replace every #sitename in blog_content
if (${debug}) _msg debug "_blogs: Replacing sitename"
local blog_content=$( echo ${blog_content} | perl -pe "s|#sitename|${site_name}|gs" )
blog_content=$(_last_updated "${blog_content}")
blog_content=$(_cleanup "${blog_content}")

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>kekePower - Blog</title>
<title>#sitename - Blog</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/css/dark.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/cal-icon.css" media="screen" />
@ -20,8 +20,8 @@
<a href="/"><img src="/images/favicon-kekepower-transparent.png" height="75"></a>
</td>
<td id="sitetitle">
<h1><a href="/">kekePower</a></h1>
<h2>Having fun scripting and hacking Linux and Mageia</h2>
<h1><a href="/">#sitename</a></h1>
<h2>#tagline</h2>
</td>
</tr>
</table>

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>kekePower - BLOGTITLE</title>
<title>#sitename - BLOGTITLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/css/dark.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/cal-icon.css" media="screen" />
@ -20,8 +20,8 @@
<a href="/"><img src="/images/favicon-kekepower-transparent.png" height="75"></a>
</td>
<td id="sitetitle">
<h1><a href="/">kekePower</a></h1>
<h2>Having fun scripting and hacking Linux and Mageia</h2>
<h1><a href="/">#sitename</a></h1>
<h2>#tagline</h2>
</td>
</tr>
</table>

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>kekePower - #pagetitle</title>
<title>#sitename - #pagetitle</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/css/dark.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/cal-icon.css" media="screen" />
@ -20,7 +20,7 @@
<a href="/"><img src="/images/favicon-kekepower-transparent.png" height="75"></a>
</td>
<td id="sitetitle">
<h1><a href="/">kekePower</a></h1>
<h1><a href="/">#sitename</a></h1>
<h2>#tagline</h2>
</td>
</tr>
@ -40,8 +40,12 @@
<!-- This is the end of the HEADER -->
<!-- Body Start -->
BODY
<!-- Body End -->
<!-- This is the beginning of the FOOTER -->
</div> <!-- End of div right -->

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8"/>
<title>El Vikingo TI - Blog</title>
<title>#sitename - Blog</title>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="Webflow" name="generator"/>
<link href="/css/minimaltemplate-v1.css" rel="stylesheet" type="text/css"/>
@ -25,7 +25,7 @@
<a href="/" class="brand-block w-clearfix w-nav-brand">
<img src="/images/el-vikingo-ti.png" width="65" alt="" class="logo-img"/>
<h1 class="logo-title">El Vikingo TI</h1>
<h1 class="logo-title">#sitename</h1>
</a>
<nav role="navigation" class="nav-menu w-nav-menu">
@ -46,7 +46,7 @@
<h1 class="main-heading">Blog</h1>
<div class="divider">
</div>
<div class="main-subtitle">Déjame ayudarte a hacer tus directos sin estrés.</div>
<div class="main-subtitle">#tagline</div>
</div>
</div>
<div class="about-section">

View File

@ -1,7 +1,7 @@
<html>
<head>
<meta charset="utf-8"/>
<title>El Vikingo TI - BLOGTITLE</title>
<title>#sitename - BLOGTITLE</title>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link href="/css/minimaltemplate-v1.css" rel="stylesheet" type="text/css"/>
<script src="/css/webfont.js" type="text/javascript">
@ -19,7 +19,7 @@ WebFont.load({ google: { families: ["Vollkorn:400,400italic,700,700italic","
<div class="w-container">
<a href="/" class="brand-block w-clearfix w-nav-brand">
<img src="/images/el-vikingo-ti.png" width="65" alt="" class="logo-img"/>
<h1 class="logo-title">El Vikingo TI</h1>
<h1 class="logo-title">#sitename</h1>
</a>
<nav role="navigation" class="nav-menu w-nav-menu">
<a href="/blog/" class="nav-link w-nav-link">← Al Blog</a>

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8"/>
<title>El Vikingo TI - #pagetitle</title>
<title>#sitename - #pagetitle</title>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="Webflow" name="generator"/>
<link href="/css/minimaltemplate-v1.css" rel="stylesheet" type="text/css"/>
@ -25,12 +25,12 @@
<a href="/" class="brand-block w-clearfix w-nav-brand">
<img src="/images/el-vikingo-ti.png" width="65" alt="" class="logo-img"/>
<h1 class="logo-title">El Vikingo TI</h1>
<h1 class="logo-title">#sitename</h1>
</a>
<nav role="navigation" class="nav-menu w-nav-menu">
<a href="/" class="nav-link w-nav-link">Inicio</a>
<a href="/sobre.html" class="nav-link w-nav-link">Sobre El Vikingo TI</a>
<a href="/sobre.html" class="nav-link w-nav-link">Sobre #sitename</a>
<a href="/servicios.html" class="nav-link w-nav-link">Que Hago</a>
<a href="/contacto.html" class="nav-link w-nav-link">Contáctame</a>
<a href="/blog/" class="nav-link w-nav-link">Blog</a>
@ -60,47 +60,6 @@ BODY
<!-- Body End -->
<!-- Section for testimonies -->
<!-- <h3>Testimonios</h3>
<div class="testimonials">
<div class="testimony">
<div class="text">
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique."
</div>
<div class="photo">
<img src="/images/el-vikingo-ti.png" alt="Testimonial Photo">
</div>
<div class="name">El Vikingo</div>
<div class="title">Noruega</div>
</div>
<div class="testimony">
<div class="text">
"Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. "
</div>
<div class="photo">
<img src="/images/el-vikingo-ti.png" alt="Testimonial Photo">
</div>
<div class="name">El Vikingo</div>
<div class="title">Noruega</div>
</div>
<div class="testimony">
<div class="text">
"Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
</div>
<div class="photo">
<img src="/images/el-vikingo-ti.png" alt="Testimonial Photo">
</div>
<div class="name">El Vikingo</div>
<div class="title">Noruega</div>
</div>
</div> -->
<!-- End Testimonies -->
<!-- Begin Footer Template -->
</div>