倒腾Pelican - Elegant Set Sidebar
依然是初期的一些乱七八糟倒腾系列。不过让我接触了Git,Markdown,静态页面,部署,等等。
Default sidebar optionsAccording to the metadata in your articles,sidebar shows:
1. You can activate Pushlish date, Modification date, Category, Tags functions by specify optional meta data variables Date, Modified, Category and Tags when editing your articles.
2. Social links is set in your ‘pelicanconfig.py’, just add your links to the Dictionary
# Social widgetSOCIAL = (('GitHub', 'https://....'), (' ...
倒腾Pelican - Collapse does not work
这里发现了一个叫Elegent的主题,现在不知道还有没有,那时候这里面的特色,使用折叠效果来展示文章分类。貌似是因为jQuery依赖出了问题,这个动效不生效,所以一顿修改。那时候连jQuery,Bootstrap,HTML都不懂,就凭借着常年debug的技能去修改。
IssueThis happens with the file elegant/templates/base.html, which rules the element of every pagesat around line 97 , there is a quote:
<script src="http://code.jquery.com/jquery.min.js"></script>
it seems the http request is nolonger credited in this case, and a potential consequence is that:The following collapse funtion in elegant/te ...
倒腾Pelican - 博客配置
Latest set#!/usr/bin/env python# -*- coding: utf-8 -*- #from __future__ import unicode_literalsAUTHOR = 'Jiheng Hu'SITENAME = "Jiheng's Blog"SITEURL = 'https://jihenghu.github.io'PATH = 'content'TIMEZONE = 'Asia/Shanghai'#DATE_FORMATS = {'zh':'%Y-%m-%d %H:%M'}DATE_FORMATS = {'en': '%a, %d %b %Y %H:%M'}THEME = 'pelican-elegant'DISQUS_SITENAME = 'jihenghu'COMMENTS_ ...
倒腾Pelican - Favicon not recognized
这是最初的几篇博客,那时候甚至不懂favicon怎么设置,慢慢的,我还没系统学习前端,这些知识就粗粗了解了。
1. In ‘pelicanconf.py’ , setUSE_SHORTCUT_ICONS = True SITELOGO = 'images/favicon.ico' FAVICON = 'images/favicon.ico' SITELOGO_SIZE = 15 ``` ### 2. Put your `favicon.ico` in path `content/images/` ### 3. In `elegant/templates/_includes/favicon_links.html` #### replace following :```html <link rel="shortcut icon" href="{{ SITEURL }}/theme/images/favicon.ico" type ...
倒腾Pelican - Auto-publish shell script for pelican blog
这是最初的那段时光,啥也不懂,不懂前端,不懂框架。那时候才研究生二年级,脑子里酝酿着转行找工作。先学Python,后学pelican,才慢慢引导我向前端进发。后来如愿拿了一堆offer, 思科,中兴,华为,海康,TPLink,寒武纪。岗位从前端到后端到云计算开发。虽然后来又经历了很多事,但是最初开始学习新鲜东西的情形仍旧历历在目。在寒假的学校,冬雪开始飘着……
First time configurationFor the first time commit to you github, you need a local git configuration.Use the commandline:
$ git config --global user.name "your name"
$ git config --global user.email johndoe@example.com
you can see your global config. using:
$ git config --list
user.name=your name
us ...