Better customized meta description

This commit is contained in:
Griatch 2021-11-18 23:26:08 +01:00
parent 148a7c5d9c
commit f5688d37e2
12 changed files with 110 additions and 37 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: The blog moved!: If you are reading this, you may notice that this blog has moved from its old home over on blogspot. I had no issues with blogspot except for the fact that writing the blog itself was done in a rather clunky editor with limited support for code. ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->

View file

@ -29,7 +29,7 @@ from os.path import abspath, dirname, join as pathjoin, sep
import jinja2
import mistletoe
from mistletoe import HTMLRenderer
from mistletoe import HTMLRenderer, BaseRenderer
from pygments import highlight
from pygments.styles import get_style_by_name as get_style
from pygments.lexers import get_lexer_by_name as get_lexer, guess_lexer
@ -129,7 +129,6 @@ def md2html():
continue
title = title[:-3] # remove .md ending
blurb = title[:11] + "..."
title = " ".join(title.split("-"))
date = datetime(year=int(year), month=int(month), day=int(day))
image_copyrights = ""
@ -155,11 +154,13 @@ def md2html():
elif line.startswith("copyrights:"):
image_copyrights = line[12:]
image_copyrights = mistletoe.markdown(image_copyrights)
elif line.startswith("blurb:"):
blurb = line[6:].strip()
# get first paragraph as blurb
markdown_blurb = "\n".join(
[line for line in lines if line and not line.startswith("!")][:3])
markdown_post = "\n".join(lines)
# convert markdown to html
blurb = mistletoe.markdown(markdown_blurb, BaseRenderer)
html = mistletoe.markdown(markdown_post, PygmentsRenderer)
# build the permalink
@ -203,11 +204,17 @@ def md2html():
)
# build the blog pages, per year
latest_post = blogpages[0].posts[0]
latest_title = latest_post.title
latest_blurb = latest_post.blurb
html_pages = {}
for blogpage in blogpages:
print(f"Processing blogs from {blogpage.year} ...")
context = {
"latest_title": latest_title,
"latest_blurb": latest_blurb,
"pageyear": blogpage.year,
"blogpage": blogpage,
"blogpages": blogpages

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Devblog: Evennia Python MUD/MU creation system</title>
<title>Evennia Devblog</title>
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../stylesheets/styles.css">
<link rel="stylesheet" href="../stylesheets/pygment_trac.css">
@ -12,8 +12,14 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Evennia is a modern Python library and server for creating text-based multi-player games and virtual worlds (also known as MUD, MUSH, MU, MUX, MUCK, etc). While Evennia handles all the necessary things every online game needs, like database and networking, you create the game of your dreams by writing normal Python modules.">
<!--[if lt IE 9]>
<meta name="description" content="
Latest Evennia dev blog: {{ latest_title }}: {{ latest_blurb }} ...
---
Evennia is a modern Python library and server for creating text-based
multi-player games and virtual worlds (also known as MUD, MUSH, MU,
MUX, MUCK, etc). While Evennia handles all the necessary things every
online game needs, like database and networking, you create the game of
your dreams by writing normal Python modules."> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->