ソースを参照

working basic template with simplify theme

banshee 1 年間 前
コミット
ca9eb5e11c

+ 35 - 0
content/blog/20230206.first_post.rst

@@ -0,0 +1,35 @@
+First blog post!
+#################
+
+:date: 2023-10-22 22:21
+:modified: 2023-10-22 22:21
+:tags: blog, housekeeping, personal
+:category: personal
+:slug: 00001-first-post
+:authors: bansh
+:summary: Welcome to my first ever blog post!
+
+Hi all,
+
+Welcome to my first ever blog post!
+I hope to start writing some interesting stuff about tech, music, books, or whatever else is on my mind.
+
+But who even am I anyway?... 
+
+Well, I work in STEM and do lots of tech-related activities in my spare time (programming, sysadmin-ing, data science, mechanics and electronics.. etc). I enjoy playing music (piano, and scottish trad fiddle, mainly), reading (sci-fi!) and rock climbing. Plus a lot of other wee things that I cant be bothered typing.
+
+Right now this is just a static site with no JS or anything. 
+Keeping it simple. 
+I might work on expanding the site functionality as I need it.
+
+I hope anyone reading this sticks around to see what I end up turning this into!
+
+**Bonus!** -- here is a photo of my cat I took on my 35mm film camera for your enjoyment :)
+
+.. image:: {filename}/images/230206_cat.jpg
+   :scale: 50 %
+   :alt: alternate text
+   :align: right
+
+Cheers!
+B

BIN
content/favicon.ico


BIN
content/images/230206_cat.jpg


BIN
content/logo.png


+ 10 - 0
content/pages/about.md

@@ -0,0 +1,10 @@
+Title: About
+Summary: Brief infomation about me
+Author: vuquangtrong
+Date: 2019-10-07 10:00
+Modified: 2019-10-07 20:00
+
+Hi there!
+
+I'm , a software engineer in Automotive field.
+`Simplify` is my first theme I created for my own blog. Please feel free to use this theme for your blogs too.

+ 5 - 0
content/robots.txt

@@ -0,0 +1,5 @@
+# www.robotstxt.org/
+
+# Allow crawling of all content
+User-agent: *
+Disallow: 

+ 155 - 13
pelicanconf.py

@@ -1,31 +1,173 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+from __future__ import unicode_literals
+from datetime import datetime
+
+# Site info
 AUTHOR = 'banshee'
+ROBOTS = 'index, follow'
+
 SITENAME = 'blog.grink.tech'
+SITETITLE = 'Banshee\'s blog'
+SITESUBTITLE = 'Subtitle subtitle'
+SITEDESCRIPTION = 'description description 2'
+SITELOGO = 'logo.png'
+COPYRIGHT_YEAR = datetime.now().year
+
+# when developing: don't specify URL, use document-relative URLs 
+SITEURL = 'https://blog.grink.tech'
+RELATIVE_URLS = False
 SITEURL = ''
+RELATIVE_URLS = True
+
+# Locale and Language
+#LOCALE = 'en_US'
+DEFAULT_LANG = 'en'
+TIMEZONE = 'Europe/London'
+DATE_FORMATS = {
+    'en': '%b %d, %Y',
+}
 
+# Build settings
 PATH = 'content'
+THEME = 'simplify-theme'
 
-TIMEZONE = 'Europe/London'
+ARTICLE_PATHS = [
+	'blog'
+]
+ARTICLE_URL = 'blog/{slug}.html'
+ARTICLE_SAVE_AS = 'blog/{slug}.html'
+#ARTICLE_PRIMARY_PATH = 'blog'
 
-DEFAULT_LANG = 'en'
+PAGE_PATHS = [
+    'pages'
+]
+
+DIRECT_TEMPLATES = [
+    'index', 
+    'authors', 
+    'categories', 
+    'tags', 
+    'archives', 
+    '404',
+    'search',
+]
+
+# below pages are not included in the theme, but you want to customize them in html and layout
+# TEMPLATE_PAGES = {
+#     'pages/test.html': 'pages/test.html'
+# }
+
+DEFAULT_PAGINATION = 10
+DEFAULT_DATE = (2023, 1, 1, 12, 0, 0)
+
+OUTPUT_PATH = 'output'
+DELETE_OUTPUT_DIRECTORY = True
 
-# Feed generation is usually not desired when developing
+# Feed generation, usually not needed when developing
 FEED_ALL_ATOM = None
 CATEGORY_FEED_ATOM = None
 TRANSLATION_FEED_ATOM = None
 AUTHOR_FEED_ATOM = None
 AUTHOR_FEED_RSS = None
 
-# Blogroll
-LINKS = (('Pelican', 'https://getpelican.com/'),
-         ('Python.org', 'https://www.python.org/'),
-         ('Jinja2', 'https://palletsprojects.com/p/jinja/'),
-         ('You can modify those links in your config file', '#'),)
+# Advanced Settings
+FORMATTED_FIELDS = [] # removed 'summary'
+STATIC_PATHS = [
+	'images',
+	'favicon.ico',
+    'logo.png',
+	#'.htaccess',
+	'robots.txt'
+]
+
+# Plugins
+# since version 4.5, plugins are installed as python packages, refer to requirements.txt
+# PLUGIN_PATHS = [
+#     '../../pelican-plugins'
+# ]
+
+PLUGINS = [
+    'sitemap', # generate sitemap document, see <https://www.sitemaps.org>
+    #'minchin.pelican.plugins.post_stats', # generate post statistics
+    'related_posts', # find articles those share common tags
+    #'neighbors', # find next, previous article 
+    'share_post', # static sharing buttons
+    #'tipue_search', # generate data for searching
+    #'tag_cloud', # generate tag cloud in different sizes
+]
+
+SITEMAP = {
+    'format': 'xml',
+    'priorities': {
+        'articles': 0.5,
+        'indexes': 0.5,
+        'pages': 0.5
+    },
+    'changefreqs': {
+        'articles': 'monthly',
+        'indexes': 'daily',
+        'pages': 'monthly'
+    }
+}
+
+RELATED_POSTS_MAX = 5
+RELATED_POSTS_SKIP_SAME_CATEGORY = False
+
+# Markdown extensions
+TYPOGRIFY = True
+MARKDOWN = {
+    'extensions': [
+        # official extensions
+        'markdown.extensions.extra', # include extensions: abbr, attr_list, def_list, fenced_code, footnotes, tables
+        'markdown.extensions.codehilite', # to generate code color scheme using pygments
+        'markdown.extensions.meta', # to parse key:value pairs at the begining of file
+        'markdown.extensions.sane_lists',# for better list 
+        'markdown.extensions.toc', # add Table of Content
+        'markdown.extensions.nl2br', # easily to add new line, but make attr_list and legacy_attrs hard to control
+        #'markdown.extensions.admonition', # to make  alert box
+        #'markdown.extensions.legacy_attrs', # insert attribs into element, but markdown already has a built-in function that do the same thing
+        #'markdown.extensions.legacy_em', # to use legacy emphasis
+        #'markdown.extensions.smarty', # converts ASCII dashes, quotes and ellipses to their HTML entity equivalents
+        #'markdown.extensions.wikilinks',
+
+        # 3rd party extensions
+        #'markdown_checklist.extension', # show checkbox in list
+        #'markdown_captions', # convert <img> to <figure> and <figcaption>
+    ],
+    'extension_configs': {
+        'markdown.extensions.codehilite': {'css_class': 'highlight'},
+    },
+    'output_format': 'html5',
+}
 
 # Social widget
-SOCIAL = (('You can add links in your config file', '#'),
-          ('Another social link', '#'),)
+SOCIAL = {
+	'facebook': 'https://facebook.com/trongvq',
+    'github': 'https://github.com/vuquangtrong',
+    'linkedin': 'https://www.linkedin.com/in/vqtrong',
+    'twitter': 'https://twitter.com/trongvq',
+}
+
+# Site validation
+# CLAIM_GOOGLE = ""
+# CLAIM_BING = ""
+
+# Search Engine
+# you can use static search engine like TipueSearch or dynami engine like Google Custom Search Engine
+# GOOGLE_CSE_ID = '007986648373531383257:hnbvizg2lks'
+
+# Comments
+#DISQUS_SITENAME = "vuquangtrong-github-io"
+
+# Sharing
+SHARE_POST = True # old style and static sharing buttons for articles, use AddThis for tracking purpose
+#ADD_THIS_ID = "ra-5d9ffca0db80069e" # can be on index, any article or page, and can track user activities
+
+# HEAP_ANALYTICS = ""
 
-DEFAULT_PAGINATION = False
+# MATOMO_SITENAME = 'vuquangtronggithubio' # new site of PIWIK
 
-# Uncomment following line if you want document-relative URLs when developing
-#RELATIVE_URLS = True
+# PIWIK_SITE_ID = ""
+# PIWIK_URL = ""
+# PIWIK_SSL_URL = ""