Coder Social home page Coder Social logo

pelican-vision's People

Contributors

lord63 avatar

Watchers

 avatar  avatar  avatar

pelican-vision's Issues

How to show the post excerpt?

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.

About the archive url

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.