Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 01 11:54

    dependabot-preview[bot] on cargo

    (compare)

  • Mar 01 11:53
    dependabot-preview[bot] closed #826
  • Mar 01 11:53
    dependabot-preview[bot] commented #826
  • Mar 01 11:53
    dependabot-preview[bot] labeled #837
  • Mar 01 11:53
    dependabot-preview[bot] opened #837
  • Mar 01 11:53

    dependabot-preview[bot] on cargo

    build(deps): bump serde_yaml fr… (compare)

  • Mar 01 11:50
    dependabot-preview[bot] labeled #836
  • Mar 01 11:50
    dependabot-preview[bot] opened #836
  • Mar 01 11:50

    dependabot-preview[bot] on cargo

    build(deps): bump liquid from 0… (compare)

  • Mar 01 11:50
    dependabot-preview[bot] labeled #835
  • Mar 01 11:50
    dependabot-preview[bot] opened #835
  • Mar 01 11:50

    dependabot-preview[bot] on cargo

    build(deps): bump assert_fs fro… (compare)

  • Feb 22 16:54
    epage commented #834
  • Feb 22 16:54
    epage labeled #834
  • Feb 22 16:51
    epage closed #698
  • Feb 22 15:55
    natjms opened #834
  • Feb 22 15:37
    epage commented #833
  • Feb 22 15:37
    epage labeled #833
  • Feb 17 10:55
    fabrixxm opened #833
  • Feb 17 10:43
    fabrixxm commented #698
Ed Page
@epage
Whats not listed are some ideas I have around improving the licensing landscape. Those will also be a relatively big distraction if I move forward with them.
Geobert Quach
@Geobert
Yeah, I've seen that you're involved in many many stuff ^^ And they all are great :D
Ed Page
@epage
workspace support in cargo-release has been a big help for me
and I hope people are more excited by typos than they were for committed
(typos is a source code spell checker targeted at being run in CIs)
Funny enough, typos was originally going to be my second Rust project for learning the language until Cobalt took over all my time
So that ideas has been sitting around for years
Geobert Quach
@Geobert
I like commited idea a lot!
Ed Page
@epage
Yay! For the most part, I got crickets when releasing it
Geobert Quach
@Geobert
I don't get it, ppl like rustc for being a nitpicker, why hostilities on commit msg?
Especially when the goal it to automate Changelogs Oo
which is super duper great
Ed Page
@epage
Some people are against auto-generated changelogs. Sometimes it is because people are unfamiliar with how conventional helps. Other times, its because they aren't considering the size of the project, how thinly spread maintainers are, and that sometimes something is better than nothing (looking at you, all those Rust crates that broke compat without any changelog for me to reference to know how to update).
For the people anti-changelog generation, I'm tempted to add a feature to committed that will error if a fix, feat, or BREAKING CHANGE commit does not include a change in the changelog.
Geobert Quach
@Geobert
Pardon them, they don't see the handyness of conventional
Ed Page
@epage
Glad you found it useful rather than annoying that I forced it on you :)
Geobert Quach
@Geobert
I didn't see the point before generation of changelogs ;)
apart from having a standardised format that ease the reading
To go back to cobalt, what do you think will happen to it? For a blog, shall I move to Zola as well?
Ed Page
@epage
I hate saying this but the answer is probably "yes"
Geobert Quach
@Geobert
I'm so sad to hear this, I wanted to catch up with Zola ^^ But yeah, I feel that cobalt pace is not suiting me anymore :'(
Geobert Quach
@Geobert
Going to bed, thank you for your honesty and good luck for the future! We'll catch up on some other project one day, I'm sure :D
Ed Page
@epage
Look forward to it :)
proegssilb
@proegssilb
Is this still a good place to talk about cobalt? It seems the last commit is several months more recent than the last conversation. :)
Ed Page
@epage
This is the right place
Geobert and I have also been doing some direct messages
proegssilb
@proegssilb
Cool. I was looking at redoing www.xenrelay.com in cobalt. Looks like I need the paginator to get the sidebar working. Is the paginator still an alpha feature that requires installing from source?
Geobert Quach
@Geobert
Ed has activated it in 0.15.5 :)
proegssilb
@proegssilb
Alright, that makes things a fair bit easier. Will have to play with that later today, after I redo extensions and maybe attempt to figure out how SASS compilation works. Thanks for the info.
Geobert Quach
@Geobert
Good luck :D
Ed Page
@epage

Current status of cobalt: On pause for a little bit.
I got unblocked on some other programs so I'm trying to get that out of the way so I won't be distracted from cobalt development.

For when I'm back, my focus is on the next branch where I'm doing a major re-architecture. The primary goal is to make it easier to add new features but I hope to also get a performance boost

@proegssilb cool. I'm curious, how did you hear about cobalt and what made you choose it? We haven't exactly been doing a great job on marketing :)
proegssilb
@proegssilb
....I have a nasty feeling sticking this in one of my includes won't work:
---
pagination:
  include: All
  per_page: 5
  order: Desc
  sort_by: ["published_date"]
---
<div class="sidebar ">
  <h2>Recent Posts</h2>
  <ul>
    {% for ppost in paginator.pages limit:5 %}
    <li><a href="{{ site.base_url}}{{ ppost.permalink }}">{{ ppost.title }}</a></li>
    {% endfor %}
  </ul>
</div>

<div class="sidebar">
  <h2>Tags</h2>
  <ul>
    {% for ptag in paginator.indexes %}
      <li><a href="/{{ ptag.index_permalink }}/">{{ ptag.index_title }}</a></li>
    {% endfor %}
  </ul>
</div>
proegssilb
@proegssilb
Yeah, looks like I got everything else except the Travis build working. Literally just need to figure out that sidebar.
Geobert Quach
@Geobert
Oh, this is what you want to do… it does not work at the moment, the index needs to be a page. The only way I'm seeing for this to work would be a frame that point to the index page. Not pretty, but the only way atm. I'm not sure on how to make this work in a sidebar
proegssilb
@proegssilb
Yeah, OK, that's the answer I was expecting. Just to confirm, "has to be a page" means I can't stick it in a layout? I'll have to think about if just having archive pages is good enough.
Ed Page
@epage
Yeah, we still need to look into how to extend it for sidebars / menus
proegssilb
@proegssilb

OK, I decided to remove the sidebar, but of course I had to figure out how to get a more bootstrap-canonical paginator, which is outside the documentation (of course). This is what I'm attempting (but I've tried a number of variants):

    <nav aria-label="Page navigation">
      {% capture startIndex %}{{ paginator.index | minus: 2 | at_least: 0 }}{% endcapture %}
      {% capture maxIndex   %}{{ paginator.total_indexes | minus: 1 }}{% endcapture %}
      {% capture currIndex  %}{{ paginator.index | minus: 1 }}{% endcapture %}
      {% capture endIndex   %}{{ paginator.index | plus: 2 | at_most: maxIndex }}{% endcapture %}
      <ul class="pagination">
        {% if paginator.previous_index %}
        <li class="page-item">
          <a class="page-link" href="{{ paginator.previous_index_permalink }}" aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
          </a>
        </li>
        {% endif %}

        {% for pgIndex in (startIndex..endIndex) %}
          <li class="page-item">
            {% if pgIndex == currIndex %}
              <a class="page-link" href="{{ paginator.index_permalink }}">{{ paginator.index }}</a>
            {% else %}
              <a class="page-link" href="{{ paginator.pages[pgIndex].permalink}}">{{ pgIndex | plus: 1 }}</a>
            {% endif %}
          </li>
        {% endfor %}

        {% if paginator.next_index %}
        <li class="page-item">
          <a class="page-link" href="{{ paginator.next_index_permalink }}" aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
          </a>
        </li>
        {% endif %}
      </ul>
    </nav>

And the error I get:

Error: build command failed
Info: caused by Failed to render content for blog/archive.html
Info: caused by liquid: Unknown index
  with:
    variable=paginator.pages
    requested index=1
    available indexes=0, first, last
from: {{% else %}}
from: {% if pgIndex == currIndex %}
from: {% for pgIndex in (startIndex..endIndex)  %}
  with:
    index=2

Is there an obvious, easy fix that I'm somehow missing? Or is this a bug in cobalt?

Geobert Quach
@Geobert
Can I see the frontmatter please?

Otherwise to give you some inspiration, this is how I'm using it:

---
permalink: /
published_date: "2018-02-10 21:57:48 +0000"
layout: default.liquid
is_draft: false
pagination:
  include: All
  per_page: 5
---
<div class="catalogue">
  {% for page in paginator.pages %}
  <div class="catalogue-item">
    <a href="/{{ page.permalink }}" class="fill-div"></a>
    <time datetime="{% include date_fr.liquid %}" class="catalogue-time">{% include date_fr.liquid %}</time>
    <h1 class="catalogue-title">{{ page.title }}</h1>
    <div class="catalogue-line"></div>

    <p>
      {{ page.excerpt }}
    </p>

    <span class="fas fa-clock eta"></span>{% include reading_time.liquid %}
    {% if page.tags %}<span class="fa fa-tags" style="margin-left: 8px;"></span>{% include print_tags.liquid %}{% endif %}
  </div>
  {% endfor %}
</div>
{% include nav_pagination.liquid %}
</div>

and nav_pagination.liquid:

<div class="pagination">
    {% if paginator.previous_index %}
      <span class="left arrow">
        <a class="one_arrow"
         href="/{{ paginator.previous_index_permalink }}">Page précédente</a>
      </span>
    {% endif %}
    {% if paginator.next_index %}
      <span class="right arrow">
        <a class="one_arrow" 
        href="/{{ paginator.next_index_permalink }}">Page suivante</a>
      </span>
    {% endif %}

    <div style="width: 100%; text-align: center;">{{ paginator.index }} / {{ paginator.total_indexes }}</div>
    <div>
        {% if paginator.previous_index %}
        <span class="end_left arrow one_arrow">
          <a style="font-size: 75%; vertical-align: 15%;" 
            href="/{{ paginator.first_index_permalink }}">Première page</a>
        </span>
      {% endif %}
      {% if paginator.next_index %}
        <span class="end_right arrow one_arrow">
          <a style="font-size: 75%; vertical-align: 15%;" 
          href="/{{ paginator.last_index_permalink }}">
          Dernière page</a>
        </span>
      {% endif %}
proegssilb
@proegssilb
---
layout: page.liquid
title: Blog archive | Xen Relay
permalink: /blog/archive.html
pagination:
  include: All
  per_page: 40
  permalink_suffix: "./{{ num }}/"
  order: Desc
  sort_by: ["published_date"]
  date_index: ["Year", "Month"]
---
proegssilb
@proegssilb

Yeah, the way you have your paginator setup works, @Geobert , but Bootstrap does things differently. A bit more like:

< 2 3 4 5 6 >

Geobert Quach
@Geobert
I see :)
I don't understand why there's nothing in paginator.pages though, I need to look into it but have my hands busy atm, I'll try to investigate asap
Geobert Quach
@Geobert
I've replaced the nav_paginator.md file with your code
and it's failing with:
[info] Building from "I:\\Dev\\blog_test\\src" into "I:\\Dev\\blog_test\\_site"
Error: build command failed
Info: caused by Failed to render content for all/3/index.html
Info: caused by liquid: Unknown index
  with:
    variable=paginator.pages
    requested index=5
    available indexes=0, 1, 2, 3, 4, first, last
from: {{% else %}}
from: {% if pgIndex == currIndex %}
from: {% for pgIndex in (startIndex..endIndex)  %}
  with:
    index=5
from: {% include nav_pagination.liquid %}
  with:
    nav_pagination.liquid=nav_pagination.liquid
So I think the error is that somehow, your code is requesting an index that is superior to the max
Geobert Quach
@Geobert
Oh, I think you want paginator.indexes[pgIndex]but it's not available for the All paginator, not sure why I did this though. paginator.pages contains the pages of the current paginator, not the other paginators.
So my conclusion: missing stuff in cobalt, @epage will correct me if I'm wrong