作家
登录

使用pelican和Github pages来搭建博客

作者: 来源: 2018-03-15 10:07:08 阅读 我要评论

/bin/activate

在虚拟情况里,你须要安装 pelican 和它的依附包。你也应当安装 ghp-import (来赞助我们宣布到 Github 上)和 Markdown (为了应用 markdown 语法来写文┞仿)。运行如下敕令:

  1. (venv)$ pip install pelican markdown ghp-import

一旦完成,你就可以应用 pelican-quickstart 开端创建你的博客了:

这将会提示我们一系列的问题。在答复它们之前,请看一下如下我的谜底:

  1. > Where do you want to create your new web site? [.] ./
  2. > What will be the title of this web site? Renata's blog
  3. > Who will be the author of this web site? Renata
  4. > What will be the default language of this web site? [pt] en
  5. > Do you want to specify a URL prefix? e.g., http://example.com (Y/n) n
  6. > Do you want to enable article pagination? (Y/n) y
  7. > How many articles per page do you want? [10] 10
  8. > What is your time zone? [Europe/Paris] America/Sao_Paulo
  9. > Do you want to generate a Fabfile/Makefile to automate generation and publishing? (Y/n) Y **# PAY ATTENTION TO THIS!**
  10. > Do you want an auto-reload & simpleHTTP script to assist with theme and site development? (Y/n) n
  11. > Do you want to upload your website using FTP? (y/N) n
  12. > Do you want to upload your website using SSH? (y/N) n
  13. > Do you want to upload your website using Dropbox? (y/N) n
  14. > Do you want to upload your website using S3? (y/N) n
  15. > Do you want to upload your website using Rackspace Cloud Files? (y/N) n
  16. > Do you want to upload your website using GitHub Pages? (y/N) y
  17. > Is this your personal page (username.github.io)? (y/N) y
  18. Done. Your new project is available at /home/username/YOUR_USERNAME.github.io

关于时区,应当指定为 TZ 时区(这里是全部列表: tz 数据库时区列表)。

如今,持续往下走并开端创建你的第一篇博文!你可能想在你爱好的代码编辑器里打开工程目次并且找到琅绫擎的 content 文件夹。然后创建一个新文件,它可以被定名为 my-first-post.md (别担心,这只是为了测试,今后你可以改变它)。在文┞仿内容之前,应当以元数据开端,这些元数据标识标题、日期、目次及更多,像下面如许:

  1. .lang="markdown" # DON'T COPY this line, it exists just for highlighting purposes
  2.  
  3. Title: My first post
  4. Date: 2017-11-26 10:01
  5. Modified: 2017-11-27 12:30
  6. Category: misc
  7. Tags: first, misc

      推荐阅读

      手机变垃圾堆?盘点高手都赞不绝口的清理利器

    有奖调研 | 人脸辨认功能在互联网行业认知度情况 --> 跟着智妙手机应用的时光越长,可用的存储空间会越来越少,这个中有效户自行增长的,却也有不少应用应用时产生临时文件及垃圾文件,这些>>>详细阅读


    本文标题:使用pelican和Github pages来搭建博客

    地址:http://www.17bianji.com/lsqh/40722.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)