使用Nikola改造我的项目页面

A week ago, I was inspired to produce a new projects page for myself. The previous one was a trainwreck with a lot of hacks. Also hosted on GitHub Pages for some reason.

一周前,我受到启发为自己制作了一个新的项目页面 。 上一个是一个有很多骇人听闻的火车残骸。 由于某种原因也托管在GitHub Pages上。

So, considering I’m so invested in Nikola already, I produced the projectpages plugin and also made it publicly available. The plugin produces two files, projects/index.html and projects/projects.json, and also enforces a specific framework for the stories used for the individual projects, because all the metadata are taken from special meta fields.

因此,考虑到我已经对Nikola进行了如此大量的投资,我制作了projectpages插件并将其公开发布。 该插件产生两个文件,即projects / index.htmlprojects / projects.json ,并且还为用于各个项目的故事实施了一个特定的框架,因为所有元数据均来自特殊的元字段。

In Nikola, post metadata is completely arbitrary (in fact, that’s my fault; I contributed the feature back in February 2013). You can put anything you want, and Nikola will let any plugin and template use the information in any way it likes.

在Nikola中,发布元数据完全是任意的(实际上,这是我的错;我在2013年2月提供了该功能 )。 您可以随意放置任何内容,Nikola将允许任何插件和模板以其喜欢的任何方式使用信息。

And that is basically the gist of the projectpages plugin. Using some specific meta fields, the plugin produces all the files. It also provides ready-made templates for the story pages (though the default templates are designed to fit my site only).

这基本上就是projectpages插件的要旨。 使用某些特定的meta字段 ,插件将生成所有文件。 它还为故事页面提供了现成的模板(尽管默认模板仅设计为适合我的网站)。

This plugin is basically a special index page generator. It takes all the stories in the designated projects directory, looks at the metadata, and lists them in a nice format (slider of featured projects + a list of everything else that is not hidden). Everything automated and done for you, as is always with Nikola — which values simplicity and ease of use.

这个插件基本上是一个特殊的索引页面生成器。 它将所有故事放在指定的项目目录中,查看元数据,并以一种不错的格式列出它们(特色项目的滑块+所有未隐藏的所有内容的列表)。 与Nikola一样,一切工作都是自动完成并为您完成的,它重视简单性和易用性。

The result: a pretty projects page. And some good OSS work done.

结果:一个漂亮的项目页面 。 并完成了一些出色的OSS工作。

PS. I just underwent a move to DigitalOcean and I love them. Moreover, this blog is proudly HTTPS only as of yesterday.

PS。 我刚刚搬到DigitalOcean ,我爱他们。 此外,该博客自昨天起仅是HTTPS。

翻译自: https://www.pybloggers.com/2014/10/revamping-my-projects-page-with-nikola/


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部