加入收藏 | 设为首页 | 会员中心 | 我要投稿 湖南网 (https://www.hunanwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

安装 Pelican 并创建仓库体现价值

发布时间:2021-06-01 23:17:06 所属栏目:教程 来源:互联网
导读:起首,你必需在当地计较机上安装 Pelican 和 ghp-import 。行使 Python 软件包安装器材 pip(你有,对吧?),这很是轻易: $ pip install pelican ghp - import
副问题[/!--empirenews.page--]

起首,你必需在当地计较机上安装 Pelican 和 ghp-import。行使 Python 软件包安装器材 pip(你有,对吧?),这很是轻易:

$ pip install pelican ghp-importMarkdown

然后,打开赏识器并在 GitHub 上为你奇怪出炉的博客建设一个新客栈,定名如下(在此处以及整个教程中,用 GitHub 用户名替代 username):

https://GitHub.com/username/username.github.io

让它保持为空,稍后我们用引人注目标博客内容来添补它。

行使呼吁行(确保正确),将这个空 Git 客栈克隆到当地计较机:

$ gitclone<https://GitHub.com/username/username.github.io> blog

$ cd blog

稀疏的花招…

在 GitHub 上宣布 Web 内容有一个不太引入留意的能力,对吩咐管在名为 username.github.io 的客栈的用户页面,其内容由 master 分支提供处事。

我凶猛提议全部的 Pelican 设置文件和原始的 Markdown 文件都不要保存在 master 中,master 中只保存 Web 内容。因此,我将 Pelican 设置和原始内容保存在一个我喜好称为 content 的单独分支中。(你可以随意建设一个分支,但以下内容相沿 content。)我喜好这种布局,由于我可以放弃掉 master 中的全部文件,然后用 content 分支从头添补它。

$ git checkout -b content

Switched to a new branch 'content'

设置 Pelican

此刻该举办内容设置了。Pelican 提供了一个很棒的初始化器材 pelican-quickstart,它会扣问你有关博客的一系列题目。

$ pelican-quickstart

Welcome to pelican-quickstart v3.7.1.

 

Thisscript will help you create a newPelican-based website.

 

Please answer the following questions so thisscript can generate the files

needed by Pelican.

 

>Wheredo you want to create your new web site?[.]

>What will be the title of this web site?Super blog

>Who will be the author of this web site? username

>What will be the default language of this web site?[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)

>How many articles per page do you want?[10]

>Whatis your time zone?[Europe/Paris] US/Central

>Do you want to generate a Fabfile/Makefile to automate generation and publishing?(Y/n) y

>Do you want an auto-reload & simpleHTTP script to assist with theme and site development?(Y/n) y

>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 usingDropbox?(y/N) n

(编辑:湖南网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读