在页面中嵌入公共GitHub项目的列表

pelican-githubprojects的Python项目详细描述


在页面中嵌入公共GitHub项目的列表。

安装

要安装鹈鹕githubprojects,只需从pypi安装即可:

$ pip install pelican-githubprojects

配置

在pelicanconf.py中启用插件

PLUGINS=[# ...'pelican_githubprojects',# ...]

使用github用户名添加设置。

GITHUB_USER='kura'

可用数据

name:The name of your project.
language:The language your project is written in, information on how GitHub detects languages is available here. It is GitHub that detects the language, not this plugin. So please, no issues about that.
description:The description of your project (as set on GitHub.)
homepage:The homepage of your project (as set on GitHub.)
github_url:The web page URL of your project on GitHub (not the GIT or API URL.)

用法

在您的模板中,您将能够迭代github_项目 变量,如下所示。

{% if GITHUB_USER %}
    <h1>Projects</h1>
    {% for project in github_projects %}
        <h2>{{ project.name }} <sup>({{ project.language }})</sup></h2><p>{{ project.description }}</p><p><ahref="{{ project.homepage }}">Homepage</a><ahref="{{ project.github_url }}">GitHub</a></p>
    {% endfor %}
{% endif %}

许可证

MIT许可证。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java是安卓的子类。所容纳之物ClipData或ClipData。项目   毕加索中的java错误get()无法应用于(安卓.content.Context)   管道接受来自控制台和管道文本文件的Java输入   Java Windows文件权限   java如何在Selenium中找到此按钮?我尝试了partiallinktext并多次尝试cssSelector   java如何在spring jdbc模板中生成流式sql?   方法中的java全局值变为null   java设备“Mobile Intel(R)4 Series Express芯片组系列”(\\.\DISPLAY1)初始化失败:   java查找单独文件夹中的资源到类文件   java iCal4j添加会议说明   java如何处理InvalidTokenException?   oop如果Java不支持运算符重载,增量运算符如何在整数实例上工作?   java如何在Hibernate中获取<map>