在虚拟情况里,你须要安装 pelican 和它的依附包。你也应当安装 ghp-import (来赞助我们宣布到 Github 上)和 Markdown (为了应用 markdown 语法来写文┞仿)。运行如下敕令:
(venv)$ pip install pelican markdown ghp-import
一旦完成,你就可以应用 pelican-quickstart
开端创建你的博客了:
这将会提示我们一系列的问题。在答复它们之前,请看一下如下我的谜底:
> Where do you want to create your new web site? [.] ./
> What will be the title of this web site? Renata's blog
> Who will be the author of this web site? Renata
> What will be the default language of this web site? [pt] en
> Do you want to specify a URL prefix? e.g., http://example.com (Y/n) n
> Do you want to enable article pagination? (Y/n) y
> How many articles per page do you want? [10] 10
> What is your time zone? [Europe/Paris] America/Sao_Paulo
> Do you want to generate a Fabfile/Makefile to automate generation and publishing? (Y/n) Y **# PAY ATTENTION TO THIS!**
> Do you want an auto-reload & simpleHTTP script to assist with theme and site development? (Y/n) n
> Do you want to upload your website using FTP? (y/N) n
> Do you want to upload your website using SSH? (y/N) n
> Do you want to upload your website using Dropbox? (y/N) n
> Do you want to upload your website using S3? (y/N) n
> Do you want to upload your website using Rackspace Cloud Files? (y/N) n
> Do you want to upload your website using GitHub Pages? (y/N) y
> Is this your personal page (username.github.io)? (y/N) y
Done. Your new project is available at /home/username/YOUR_USERNAME.github.io
关于时区,应当指定为 TZ 时区(这里是全部列表: tz 数据库时区列表)。
如今,持续往下走并开端创建你的第一篇博文!你可能想在你爱好的代码编辑器里打开工程目次并且找到琅绫擎的 content
文件夹。然后创建一个新文件,它可以被定名为 my-first-post.md
(别担心,这只是为了测试,今后你可以改变它)。在文┞仿内容之前,应当以元数据开端,这些元数据标识标题、日期、目次及更多,像下面如许:
.lang="markdown" # DON'T COPY this line, it exists just for highlighting purposes
Title: My first post
Date: 2017-11-26 10:01
Modified: 2017-11-27 12:30
Category: misc
Tags: first, misc
推荐阅读
有奖调研 | 人脸辨认功能在互联网行业认知度情况 --> 跟着智妙手机应用的时光越长,可用的存储空间会越来越少,这个中有效户自行增长的,却也有不少应用应用时产生临时文件及垃圾文件,这些>>>详细阅读
本文标题:使用pelican和Github pages来搭建博客
地址:http://www.17bianji.com/lsqh/40722.html
1/2 1