Name | pelican-featured-image JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | Pelican plugin to add a featured image, extracting from summary or content if not specified in metadata |
upload_time | 2023-08-14 08:43:33 |
maintainer | |
docs_url | None |
author | |
requires_python | <4.0,>=3.8.1 |
license | AGPL-3.0 |
keywords |
graphic
image
pelican
plugin
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Featured Image: A Plugin for Pelican
====================================
[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/featured-image/main.yml?branch=main)](https://github.com/pelican-plugins/featured-image/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-featured-image)](https://pypi.org/project/pelican-featured-image/)
[![Downloads](https://img.shields.io/pypi/dm/pelican-featured-image)](https://pypi.org/project/pelican-featured-image/)
![License](https://img.shields.io/pypi/l/pelican-featured-image?color=blue)
This Pelican plugin extracts an image from the summary or content of an article or page if not already specified in content metadata.
Installation
------------
This plugin can be installed via:
python -m pip install pelican-featured-image
As long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `featured_image` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.
Usage
-----
To override the default behavior of selecting the first image in the article's summary or content, set the image property the article's metadata to the URL of the image to display, e.g:
```markdown
Title: My super title
Date: 2010-12-03 10:20
Category: Python
Tags: pelican, publishing
Slug: my-super-post
Author: Alexis Metaireau
Summary: Short version for index and feeds
Image: /images/my-super-image.png
Article content...
```
### Page
To include a representative image in a page add the following to the template:
```html
{% if page.featured_image %}
<img src="{{ page.featured_image }}">
{% endif %}
```
### Article
To include a representative image in an article add the following to the template:
```html
{% if article.featured_image %}
<img src="{{ article.featured_image }}">
{% endif %}
```
Contributing
------------
Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].
To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.
[existing issues]: https://github.com/pelican-plugins/featured-image/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html
License
-------
This project is licensed under the AGPL-3.0 license.
Raw data
{
"_id": null,
"home_page": "",
"name": "pelican-featured-image",
"maintainer": "",
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": "",
"keywords": "graphic,image,pelican,plugin",
"author": "",
"author_email": "Justin Mayer <entroP@gmail.com>, Paolo Melchiorre <paolo@melchiorre.org>, Tobias Schmidl <tobias@schmidl.dev>",
"download_url": "https://files.pythonhosted.org/packages/f3/5a/40a422254837482be809fa405f7d76d96db843f06a0550b14fc797902cf4/pelican_featured_image-1.0.0.tar.gz",
"platform": null,
"description": "Featured Image: A Plugin for Pelican\n====================================\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/featured-image/main.yml?branch=main)](https://github.com/pelican-plugins/featured-image/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/pelican-featured-image)](https://pypi.org/project/pelican-featured-image/)\n[![Downloads](https://img.shields.io/pypi/dm/pelican-featured-image)](https://pypi.org/project/pelican-featured-image/)\n![License](https://img.shields.io/pypi/l/pelican-featured-image?color=blue)\n\nThis Pelican plugin extracts an image from the summary or content of an article or page if not already specified in content metadata.\n\nInstallation\n------------\n\nThis plugin can be installed via:\n\n python -m pip install pelican-featured-image\n\nAs long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `featured_image` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.\n\nUsage\n-----\n\nTo override the default behavior of selecting the first image in the article's summary or content, set the image property the article's metadata to the URL of the image to display, e.g:\n\n```markdown\nTitle: My super title\nDate: 2010-12-03 10:20\nCategory: Python\nTags: pelican, publishing\nSlug: my-super-post\nAuthor: Alexis Metaireau\nSummary: Short version for index and feeds\nImage: /images/my-super-image.png\n\nArticle content...\n```\n\n### Page\n\nTo include a representative image in a page add the following to the template:\n\n```html\n{% if page.featured_image %}\n <img src=\"{{ page.featured_image }}\">\n{% endif %}\n```\n\n### Article\n\nTo include a representative image in an article add the following to the template:\n\n```html\n{% if article.featured_image %}\n <img src=\"{{ article.featured_image }}\">\n{% endif %}\n```\n\nContributing\n------------\n\nContributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].\n\nTo start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.\n\n[existing issues]: https://github.com/pelican-plugins/featured-image/issues\n[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html\n\nLicense\n-------\n\nThis project is licensed under the AGPL-3.0 license.\n",
"bugtrack_url": null,
"license": "AGPL-3.0",
"summary": "Pelican plugin to add a featured image, extracting from summary or content if not specified in metadata",
"version": "1.0.0",
"project_urls": {
"Funding": "https://donate.getpelican.com/",
"Homepage": "https://github.com/pelican-plugins/featured-image",
"Issue Tracker": "https://github.com/pelican-plugins/featured-image/issues"
},
"split_keywords": [
"graphic",
"image",
"pelican",
"plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "587cf1f39cffbb3952bdfa3cd1c39e9fe2efc9b7bf8bf6d153243900689b98a0",
"md5": "daf051eaeca90d8c4cb83947617e12f1",
"sha256": "ccf57ab6c8edf260b996ad8373ca352c4c9c2df3b7606173123303fa226006a9"
},
"downloads": -1,
"filename": "pelican_featured_image-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "daf051eaeca90d8c4cb83947617e12f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 5179,
"upload_time": "2023-08-14T08:43:32",
"upload_time_iso_8601": "2023-08-14T08:43:32.524897Z",
"url": "https://files.pythonhosted.org/packages/58/7c/f1f39cffbb3952bdfa3cd1c39e9fe2efc9b7bf8bf6d153243900689b98a0/pelican_featured_image-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f35a40a422254837482be809fa405f7d76d96db843f06a0550b14fc797902cf4",
"md5": "b516d3ae7d7d6d83a247a21f63bb1277",
"sha256": "6f19431c76fec9227fc9e7e24f4bd7a49835336270e5bbdaa1c093d6da7f9733"
},
"downloads": -1,
"filename": "pelican_featured_image-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b516d3ae7d7d6d83a247a21f63bb1277",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 6956,
"upload_time": "2023-08-14T08:43:33",
"upload_time_iso_8601": "2023-08-14T08:43:33.942145Z",
"url": "https://files.pythonhosted.org/packages/f3/5a/40a422254837482be809fa405f7d76d96db843f06a0550b14fc797902cf4/pelican_featured_image-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-14 08:43:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pelican-plugins",
"github_project": "featured-image",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pelican-featured-image"
}