lord63 / pelican-vision Goto Github PK
View Code? Open in Web Editor NEW!!!WIP!!! It's a pelican theme port from the original jekyll theme "jekyll-vision" by lepture.
License: MIT License
!!!WIP!!! It's a pelican theme port from the original jekyll theme "jekyll-vision" by lepture.
License: MIT License
In jekyll, we can use post.excerpt
to do that.
In pelican, I tried to use:
<div class="detail">
<h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
{% if article.summary %}
<div class="description">{{ article.summary }}</div>
{% else %}
<div class="description">{{ article.content | striptags | truncate(100) }}</div>
{% endif %}
</div>
if you're using summary
file meta data, you should be good to go. If you don't use it, I try to show the first 100 characters of your post.It seems good if your posts are in english, when in chinese, the excerpt is much more that we want.
The point is the original design need you write some summary for the post(default is the first paragraph), so if you don't and still want to use the original theme, you might have to migrate your blog, you need to do something.(I'm not tolerant of the meaningless first paragraph summary, a good example is Armin Ronacher's blog )
I try to make migration as less as possible.
So in the ported theme, if I skip it, the index of your blog seems ugly, but if I add the excerpt, how to show them? (first paragraph? first 100 characters? or ?)Because if the first 100 characters weren't your summary, there may be something unpleasant happened.
our default archive url is archives.html
, but if we can configure our url set to /{slug}
, then the archive url would be archives
.
My question is: since I need archive url in article.html:
{% if article.tags %}
<div class="entry-tags">
{% for tag in article.tags %}
<a class="tag" href="/archives#{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
How to make sure the archive url is always right? I can set a variable like ARCHIVE_URL
in the configuration file, but it's not the way I like, any better ways?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.