pelican

Mixed Content with Pelican

℡╲_俬逩灬. 提交于 2020-01-04 06:03:47
问题 TL;DR My Pelican blog is served through HTTPS but CSSs are not loaded because of "mixed content", even though they appear in the page source as HTTPS. Context I have a Pelican blog hosted on GitHub pages. I have a CNAME record for a custom domain to point to this blog. The aim I'm trying to achieve serving this blog with HTTPS, which is possible with CloudFlare (GitHub support told me it's the only solution at the moment). The problem After setting everything as indicated, I can access my

Mixed Content with Pelican

…衆ロ難τιáo~ 提交于 2020-01-04 06:03:11
问题 TL;DR My Pelican blog is served through HTTPS but CSSs are not loaded because of "mixed content", even though they appear in the page source as HTTPS. Context I have a Pelican blog hosted on GitHub pages. I have a CNAME record for a custom domain to point to this blog. The aim I'm trying to achieve serving this blog with HTTPS, which is possible with CloudFlare (GitHub support told me it's the only solution at the moment). The problem After setting everything as indicated, I can access my

Pelican image links break when viewing article through “categories”

一曲冷凌霜 提交于 2019-12-24 02:56:15
问题 I am sure I'm missing something obvious. I'm defining Categories through folder names inside the content folder. If I click content while viewing a page, I see folder names (e.g. categ1, categ2) plus 'misc', that's fine. When I click categ1, I see one complete article but the image links are now all broken. localhost:8000/category/categ1.html What I would like to see is just a click-able list of articles in that category. Or at the very least, not broken links. (I have similar behavior if I

Querying for specific articles (via tag/category) in Pelican themes

末鹿安然 提交于 2019-12-22 09:00:03
问题 Is it possible to set query parameters via jinja in Pelican template files? index.html {% if articles %} {% for article in articles_page.object_list if article.category == 'article' %} #stuff {% endfor %} {% endif %} This will return articles in the article category, but only if they happen to be in the articles already queried for. The desirable setup would be to grab x articles in y category (or with y tag) - is that possible? 回答1: This code snippet works for me to bring back a list of all

How to link your own articles on a Pelican blog?

二次信任 提交于 2019-12-22 04:43:19
问题 I tried to link with the html file name, but it works because they are on the same folder. [Title](./this-is-the-file.html) But it is possible that another article would appear on another folder because of the ARTICLE_URL pattern. Examples: [Title 1](/2014/02/article1.html) [Title 2](/2014/01/25/article2.html) Is it possible to link your own articles with a reference to the slug ? Any other better solution than the generated HTML file name ? 回答1: As noted in the documentation, you can link to

用pelican搭建完美博客

て烟熏妆下的殇ゞ 提交于 2019-12-18 02:49:05
前面有文章介绍本站采用了 Python 编写的 Pelican 静态生成博客系统, 之所以没有使用当前很火的 Jekyll , 是因为它是 Ruby 编写, 而我又对 Ruby 没有啥兴趣, 所以还是选择了使用了我熟悉的Python编写的这套系统, 我用了一段时间,打算将使用经验分享出来 介绍 Pelican 是一套开源的使用Python编写的博客静态生成, 可以添加文章和和创建页面, 可以使用 MarkDown reStructuredText 和 AsiiDoc 的格式来抒写, 同时使用 Disqus 评论系统, 支持 RSS 和 Atom 输出, 插件, 主题, 代码高亮等功能, 采用 Jajin2 模板引擎, 可以很容易的更改模板 安装 可以从 github 克隆最新的代码安装, 并且建议在 virtualenv 下使用: 建立 virtualenv virtualenv pelican # 创建 cd pelican sh bin/activate # 激活虚拟环境 上面建立了一个Python的虚拟环境(这个命令不是内置可以使用 easy_install virtualenv 安装) 从github克隆最新代码安装Pelican git clone git://github.com/getpelican/pelican.git # 代码 cd pelican python

使用pelican创建静态博客

≡放荡痞女 提交于 2019-12-18 00:44:35
创建工作目录 首先使用pip安装pelican和markdown pip install pelican markdown 然后创建目录 mkdir my_blog 接着进入目录 cd my_blog ,执行 pelican-quickstart ,当前目录内就会生成默认配置好的文件 修改配置 pelicanconf.py是博客的配置文件: #!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'printR' SITENAME = u"catmelo" SITEURL = 'http://www.cnblogs.com/catmelo/' PATH = 'content' TIMEZONE = 'Asia/Shanghai' DATE_FORMATS = {'zh':'%Y-%m-%d %H:%M'} DELETE_OUTPUT_DIRECTORY = False DEFAULT_LANG = u'zh' THEME = 'pelican-themes/pelican-bootstrap3' PLUGIN_PATHS = ["plugins", "pelican-plugins"] PLUGINS = ['tag_cloud',

What is the correct way to express a path in order to get Pelican generated html to link to an image?

懵懂的女人 提交于 2019-12-12 18:48:32
问题 I'm just starting to create a blog with Pelican and wanted to link to an image. I did this by including the following line in my Markdown file: <img src="./myImg1a.png" alt="./myImg.png" style="width: 750px; height: 800px;"/> This line was successfully reproduced in the html file, which Pelican placed in the output directory (i.e. /myBlog/output ). I placed the png files in the output directory (i.e. the same directory as the html files and got the following error: WARNING:root:Unable to find

In Pelican, how can I link an image to its fullsize version?

自闭症网瘾萝莉.ら 提交于 2019-12-12 16:54:41
问题 In my Pelican blog article I have something like this: ![Alt Text]({filename}/images/foo.jpg) This works fine as it includes foo.jpg into the article, i.e., it creates <img src="/images/foo.jpg" alt="Alt Text"> However, I'd like to make this image clickable so users can link the image to go to a URL for the full-size image, i.e. <a href="/images/foo.jpg"><img src="/images/foo.jpg" alt="Alt Text"></a> How can I do that in Pelican? Thanks. 回答1: Perhaps try: [![Alt Text]({filename}/images/foo

How to add image from within 'content' subfolder - pelican

和自甴很熟 提交于 2019-12-11 07:28:09
问题 I got a structure content/ ├── applications │ └── 2017 │ └── 08 │ └── 30 │ ├── article.md │ └── forecast1.png I want the img files to be same directories as the md files so that they can be put to: ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html' I have STATIC_PATHS = ['static_files','content'] however, the [alt]({attach}applications/2017/08/30/forecast1.png) gives error: WARNING: Unable to find `applications/2017/08/30/forecast1.png`, skipping url replacement. How