-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a91aea6
commit 4054027
Showing
30 changed files
with
1,363 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ pip-log.txt | |
.coverage | ||
.tox | ||
nosetests.xml | ||
test/output/ | ||
|
||
# Translations | ||
*.mo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Title: Issue 5 Test | ||
Slug: issue-5 | ||
Date: 2024-01-02 | ||
Category: Misc | ||
Status: published | ||
|
||
Summary starts here | ||
|
||
[This link will be broken]({filename}/articles/2024/target.md) | ||
|
||
Summary ends here | ||
|
||
<!-- PELICAN_END_SUMMARY --> | ||
|
||
Main content after summary | ||
|
||
Basic issue is that links are processed when they are presented as part of the | ||
article `content`, but not when it's part of the `summary`. | ||
|
||
See [Issue #5](https://github.com/MinchinWeb/minchin.pelican.plugins.summary/issues/5). | ||
|
||
C.f. [Issue #4](https://github.com/MinchinWeb/minchin.pelican.plugins.summary/issues/4) and | ||
[Pelican Issue #3265](https://github.com/getpelican/pelican/issues/3265). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Title: Link Target | ||
Slug: test1 | ||
Date: 2024-01-01 | ||
Category: Misc | ||
Status: published | ||
|
||
Summary starts here | ||
|
||
Summary ends here | ||
<!-- PELICAN_END_SUMMARY --> | ||
|
||
Main content after summary |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Uncomment following line if you want document-relative URLs when developing | ||
#RELATIVE_URLS = True | ||
|
||
ARCHIVES_SAVE_AS = 'pages/archives.html' | ||
MENUITEMS = [ ('All posts', '/pages/archives.html') ] | ||
|
||
SITENAME = 'Summary Test Site' | ||
SITESUBTITLE = 'minchin.pelican.plugins.summary' | ||
# SITEURL = 'https://abcdef.com' | ||
SITEURL = "" | ||
|
||
PATH = 'content' | ||
# OUTPUT_PATH = "output" | ||
|
||
TIMEZONE = 'UTC' | ||
|
||
DEFAULT_LANG = 'en' | ||
|
||
# Feed generation is usually not desired when developing | ||
FEED_MAX_ITEMS = 5 | ||
FEED_ALL_ATOM = 'feeds/all.atom.xml' | ||
FEED_ALL_RSS = 'feeds/all.rss.xml' | ||
|
||
CATEGORY_FEED_ATOM = None | ||
TRANSLATION_FEED_ATOM = None | ||
AUTHOR_FEED_ATOM = None | ||
AUTHOR_FEED_RSS = None | ||
|
||
THEME = "themes/Peli-Kiera" | ||
|
||
DEFAULT_PAGINATION = 10 | ||
|
||
DEFAULT_CATEGORY = 'Misc' | ||
|
||
USE_FOLDER_AS_CATEGORY = False #otherwise year categories will appear | ||
|
||
PLUGINS = ['sitemap', 'more_categories', 'minchin.pelican.plugins.summary'] | ||
|
||
SITEMAP = { | ||
'format': 'xml', | ||
'priorities': { | ||
'articles': 0.6, | ||
'indexes': 0.5, | ||
'pages': 0.4 | ||
}, | ||
'changefreqs': { | ||
'articles': 'weekly', | ||
'indexes': 'weekly', | ||
'pages': 'monthly' | ||
} | ||
} | ||
|
||
MARKDOWN = { | ||
'extension_configs': { | ||
'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums': True}, | ||
'markdown.extensions.extra': {}, | ||
'markdown.extensions.meta': {}, | ||
}, | ||
'output_format': 'html5', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
anyio == 4.1.0 | ||
blinker == 1.7.0 | ||
docutils == 0.20.1 | ||
feedgenerator == 2.1.0 | ||
idna == 3.4 | ||
Jinja2 == 3.1.2 | ||
Markdown == 3.5.1 | ||
markdown-it-py == 3.0.0 | ||
MarkupSafe == 2.1.3 | ||
mdurl == 0.1.2 | ||
minchin.pelican.plugins.autoloader == 1.2.1 | ||
minchin.pelican.plugins.summary == 1.2.1 | ||
ordered-set == 4.1.0 | ||
pelican == 4.9.1 | ||
pelican-more-categories == 0.1.0 | ||
pelican-sitemap == 1.1.0 | ||
pip == 23.3.2 | ||
Pygments == 2.17.2 | ||
python-dateutil == 2.8.2 | ||
pytz == 2023.3.post1 | ||
rich == 13.7.0 | ||
semantic-version == 2.10.0 | ||
setuptools == 68.2.2 | ||
six == 1.16.0 | ||
sniffio == 1.3.0 | ||
Unidecode == 1.3.7 | ||
watchfiles == 0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 b. avianto | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
|
||
# Peli-Kiera | ||
|
||
Peli-Kiera is a theme for the Pelican static site generator. | ||
Thanks to the [Hugo-Kiera](https://github.com/avianto/hugo-kiera) project for the inspiration. | ||
### Demo | ||
Live-Demo at [https://aleylara.github.io/Peli-Kiera](https://aleylara.github.io/Peli-Kiera) | ||
### Installation | ||
[Pelican-Docs](https://docs.getpelican.com/en/stable/) will guide you through the initial installation. | ||
Once inside the project directory, Peli-Kiera theme can be installed by cloning the repo into your | ||
themes path and pointing to it in your `pelicanconf.py`. | ||
```bash | ||
# Create a themes directory if it doesn't exists | ||
cd project-dir | ||
pelican-quickstart | ||
mkdir themes | ||
cd themes | ||
git clone https://github.com/aleylara/Peli-Kiera | ||
|
||
# Add path to your theme directory in pelicanconf.py | ||
THEME = 'themes/Peli-Kiera' | ||
``` | ||
In order to get read times and links between articles, the theme requires [pelican-readtime](https://github.com/getpelican/pelican-plugins/tree/master/readtime) and [neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors) plugins. | ||
|
||
```bash | ||
cd project-dir/ | ||
# Please note the plugins repo is quite large and you only need the two. | ||
git clone https://github.com/getpelican/pelican-plugins | ||
|
||
# Add path to your plugins directory in pelicanconf.py | ||
PLUGIN_PATHS = ['pelican-plugins'] | ||
PLUGINS = ['readtime', 'neighbors'] | ||
``` | ||
A sample article header. | ||
```text | ||
Title: Simple is better than complex | ||
Date: 2018-11-14 | ||
Tags: python, jupyter, library | ||
Description: The Zen of Python | ||
Category: Python | ||
### Introduction | ||
This is a standard paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. | ||
``` | ||
Go ahead and create few articles in respective directories. | ||
```bash | ||
# Generate articles and populate output | ||
pelican content -o output -s pelicanconf.py | ||
# start the local server on http://localhost:8000/ | ||
pelican --autoreload --listen | ||
``` | ||
|
||
Final project directory structure should look similiar to this. | ||
|
||
```bash | ||
(Pelican) ➜ project-dir tree | ||
│ | ||
├── Makefile | ||
├── content/ | ||
│ ├── Python/ | ||
│ │ ├── article-one.md | ||
│ │ ├── article-two.md | ||
│ │ └── article-three.md | ||
│ ├── Research/ | ||
│ │ ├── article-one.md | ||
│ │ ├── article-two.md | ||
│ │ └── article-three.md | ||
│ ├── images/ | ||
│ │ ├── camera-2008479_640.png | ||
│ │ ├── camera-wide.png | ||
│ │ └── wide-wide.png | ||
│ └── pages/ | ||
│ └── about.md | ||
├── output/ | ||
│ | ||
├── pelicanconf.py | ||
├── pelican-plugins/ | ||
│ ├── neighbors | ||
│ │ ├── Readme.rst | ||
│ │ ├── __init__.py | ||
│ │ └── neighbors.py | ||
│ └── readtime | ||
│ ├── README.md | ||
│ ├── __init__.py | ||
│ └── readtime.py | ||
├── publishconf.py | ||
├── tasks.py | ||
└── themes | ||
└── Peli-Kiera/ | ||
``` | ||
|
||
### Settings | ||
Example `pelicanconf.py` | ||
|
||
```python | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- # | ||
from __future__ import unicode_literals | ||
|
||
AUTHOR = 'Author' | ||
COPYRIGHT = '2019' | ||
SITENAME = 'Site-Name' | ||
SITEURL = 'https://www.example.com' | ||
SITESUBTITLE = 'Site Subtitle' | ||
PATH = 'content' | ||
TIMEZONE = 'America/New_York' | ||
DEFAULT_LANG = 'en' | ||
|
||
THEME = 'themes/Peli-Kiera' | ||
PLUGIN_PATHS = ['pelican-plugins'] | ||
PLUGINS = ['readtime', 'neighbors'] | ||
STATIC_PATHS = ['images'] | ||
# Article summary length on main index page | ||
SUMMARY_MAX_LENGTH = 100 | ||
DEFAULT_PAGINATION = 10 | ||
GITHUB_URL = 'https://github.com/' | ||
|
||
# Feed generation is usually not desired when developing | ||
FEED_ALL_ATOM = 'feeds/all.atom.xml' | ||
CATEGORY_FEED_ATOM = None | ||
TRANSLATION_FEED_ATOM = None | ||
AUTHOR_FEED_ATOM = None | ||
AUTHOR_FEED_RSS = None | ||
RSS_FEED_SUMMARY_ONLY = True | ||
|
||
# Social widget | ||
SOCIAL = ( | ||
('twitter', 'https://twitter.com/'), | ||
('linkedin', 'https://www.linkedin.com'), | ||
('github', 'https://github.com/'), | ||
('gitlab', 'https://gitlab.com/'), | ||
('facebook', 'https://facebook.com'), | ||
('instagram', 'https://instagram.com'), | ||
) | ||
|
||
# DISQUS_SITENAME = '' | ||
# GOOGLE_ANALYTICS = '' | ||
|
||
# Uncomment following line if you want document-relative URLs when developing | ||
# RELATIVE_URLS = True | ||
``` | ||
|
||
### Features | ||
* Atom/RSS feeds | ||
* Mobile friendly | ||
* Google analytics | ||
* Comments via Disqus | ||
* Font awesome icons | ||
* Modified pagination | ||
* Image placements | ||
|
||
### Pagination and image placement | ||
The pagination is presented with the current page and 3 neighboring pages on either side. | ||
|
||
<< < 7 8 9 **10** 11 12 13 > >> | ||
|
||
Images can be moved on page by adding the tag `#float-right`, `#float-left`, `#mid` and `#full` in your markdown. | ||
|
||
```markdown | ||
![Title]({static}/images/my_image-600x400.png#float-right "camera icon") | ||
``` | ||
|
||
Similarly, the placement can also be applied to html directly by wrapping images in a `<figure class="placement">` tag. | ||
|
||
```html | ||
<figure class="float-left"> | ||
<img src="path-to/images/my_image-600x400.png" alt="camera icon"> | ||
</figure> | ||
``` | ||
Minimum image width of 600px is recommended. Images scale accordingly on smaller screens. | ||
|
||
### Preview | ||
![Screenshot1](screenshot-1.png "Screenshot Desktop") | ||
![Screenshot2](screenshot-2.png "Screenshot Mobile") | ||
![Screenshot3](screenshot-3.png "Screenshot Mobile") | ||
|
||
### License | ||
[MIT License](https://github.com/avianto/hugo-kiera/blob/master/LICENSE.md) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.