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
I broke it out to avoid new features from breaking users
Danilo Spinella
@DanySpin97
I see, however this is different than how jekyll and hugo works
I'll try changing the application code to use data, thanks for the answer
Ed Page
@epage
@DanySpin97 forgot to follow up, is there a downside to putting user-defined data under data rather than mixing it with the application-defined data?
@Geobert and anyone else, I'd be curious what your all thoughts are on cobalt-org/cobalt.rs#779 particularly what embedded language to use.
Geobert Quach
@Geobert
Blimey this guy is way too much smarter than me xD
Ed Page
@epage
Yeah, he came to liquid with some weird PRs. It was interesting to find out what he built with them
Ed Page
@epage
Looks like I forgot to do a release of cobalt. Just released 0.16 which has upgrade liquid, including where filter support.
Andres Pierce
@andrespierce_gitlab
Hello All, and thanks for the great work you've done on cobalt.
I have a food blog (stewquest.com) that works at lightning speed, deploys wonderfully and runs in a 5 clams a month server, all thanks to you wonderful people. Rock on.
Ed Page
@epage
Glad to hear. I will say that things have slowed down a bit while I try to wrap up some other open source projects so I can be less distracted with cobalt.
I have plans for speeding it up further once I can focus more on it.
And if you have ideas for an alternative name, we've been thinking of renaming to try to get something that is more closely tied to what it does
Andres Pierce
@andrespierce_gitlab
I've noticed cobalt being updated a stretch at a time, I fully understand this is the way things are in foss. Pagination was the last much needed addition imho. I can't help you with a name, but I'd say maybe to have a full featured liquid theme, with categories and pagination, would make it easier for people with no experience to take off.
Geobert Quach
@Geobert
Happy that the pagination is useful :D
matrixbot
@matrixbot
daxfohl Having trouble following the fasterthanli.me tutorial with most recent tide. It requires state to implement Clone, which apparently Template does not? (https://stackoverflow.com/questions/64866917)
Ed Page
@epage
Still double checking why Template doesn't implement Clone but in the mean time, you could wrap it in Rc or Arc to make it cloneable.
So the reason Template doesn't implement Clone is that it is effectively a Vec<Box<dyn Renderable>>. There is extra work to make a type like that cloneable but its a it of work.
I've been interested in re-architecting to not need Box (or at least, not as much). That would be a large undertaking though and is complicated by Liquid's semantics where anything can be plugged in and so there isn't a simple set of types to lower everything to.
Or at least, I suspect there isn't. It'd take some investigation
So the Arc is probably the best option for right now
Geobert Quach
@Geobert
Hi there and Happy New year !
Hope you're all well and safe :)
Tomás Gutiérrez
@0x00cl_gitlab
Hello!
Tomás Gutiérrez
@0x00cl_gitlab

I have a question about generating pages. I have data files with information, lets say I have _data/huskies.yaml and that file contains a list of different dogs with information

   -name: bob
    color: black
  - name: alice
    color: white

Is it possible to create a page (.html) for each dog in that file? like this http://localhost/dogs/huskies/bob and http://localhost/dogs/huskies/alice
So if I have 1000 dogs in that yaml file, it will create 1000 pages with http://localhost/dogs/huskies/{{ huskies.name }}

WIth Jekyll I was able to do it with a gem called "jekyll-datapage-generator", is it possible with cobalt to generate pages based on _data?
Ed Page
@epage
Happy new year!

@0x00cl_gitlab at the moment, no. Could you expand on the use case to clarify when these are needed?

I have a future use case where I will have data but I'll also have assets. My thought was to create a page per asset and tag the page with an identifier from the data. cobalt could then generate pages for all of the tags and provide links to the relevant assets and lookup the information from the data file.

Tomás Gutiérrez
@0x00cl_gitlab

@epage Thanks for answering. I'll be more specific with my case, I'm trying to archive cards CCG, these cards have different editions and for each edition I have a .yaml file. Each edition can contain 100+ cards, and so in each .yaml file I have a big list of cards with name, description, costs and other data exclusive to that card.
I want each card to have its own page where it displays all of its information at http://localhost/gen1edition/{{ card.name }}.

Maybe I'm going the wrong way about it, but what I'm trying to avoid is having hundreds of .md files with the same variable names set between "---" and just manage the cards from one big file (.yaml).

If the data is an array, it is straightforward to build an index page, containing all records, using a Liquid loop. In some occasions, however, you also want to generate one page per record. Consider, e.g., a list of team members, for which you want to generate an individual page for each member.

Ed Page
@epage
That makes sense. Could you create an issue for this for us to discuss the design and trade offs? In the mean time, a simple shell script will probably be required :/
Tomás Gutiérrez
@0x00cl_gitlab
Sure, no worries.
Tomás Gutiérrez
@0x00cl_gitlab
#824 Done
Daniel Cellucci
@cellu_cc_gitlab
Hi I recently picked up Cobalt and I have to say it's a pretty awesome tool. I am using it to create my personal website- this site has both blog posts and a portfolio. I'd like the portfolio to be a collection of pages that are distinct from the posts collection. Is there a way to set up cobalt to generate two separate collections (say "posts" and "works"). Perhaps this isn't the correct way to do things and I should instead use tags? I'm not sure and could use some help.
Ed Page
@epage
Working towards supporting that is one of the reasons why visible progress has slowed down (on top of having a kid and trying to double down on other projects so I can better focus)
I've been finding the current architecture is limiting changes like that and I need to re-work some of the basics to make managing multiple collections, and other fun features, easier to deal with
The issue for this is cobalt-org/cobalt.rs#368
Daniel Cellucci
@cellu_cc_gitlab
Awesome! Im glad im not the only one who ran into this. I ended up using tags to filter the post collection and that seems to work nicely. That said I’d say im an intermediate rust programmer and i would be happy to see if i can help implement this feature! Will let you know.
Ed Page
@epage

For the last while, I've been focused on another project so I can get it to the point of passive maintenance so I can give more attention to cobalt but during a recent storm when I lost internet access, Liquid was the only project I had major enough work to do without internet access that wasn't too major, so I took on a major re-architecture of Liquid to speed up array iteration. I'm just about to land the second PR.
cobalt-org/liquid-rust#432

What should be faster

  • forloop on arrays Cobalt injects into the context

What won't be faster

  • forloop on objects Cobalt injects into the context

What might be slower

  • Any access to data that you assign

Still need to benchmark to double check all of this.

(forloop was one place where liquid was significantly slower than tera)
Geobert Quach
@Geobert

God I forgot you are in Texas, hope you're OK!

Well done for liquid!

Ed Page
@epage

We made it. We were in one of the batches without power the longest but we had natural gas so we could cook on the stove top and keep a fire going (the lowest the were able to record the house at was 43 F). Right as we were getting power back, we lost water for a day or two. My wife hurt her back from carrying water but that is the only longer term impact we had.

Later, we found out some neighbors had no gas and no wood and were barely making it in their houses. Other neighbors had pipes burst, lots of carpet and drywall in the trash pickup this week.

Geobert Quach
@Geobert
Yeah I've seen pics of houses full of ice dangling from the ceiling, scary stuff :-/
I'm glad you guys made it through, I hope everything is back now
Ed Page
@epage
Benchmarking bench_big_table/render/tera: Analyzing
bench_big_table/render/tera
                        time:   [3.6490 ms 3.6660 ms 3.6817 ms]
Benchmarking bench_big_table/render/liquid: Analyzing
bench_big_table/render/liquid
                        time:   [5.2930 ms 5.3266 ms 5.3678 ms]
                        change: [-57.345% -56.954% -56.563%] (p = 0.00 < 0.05)

(change is relative to the last liquid release)

Was hoping we'd be significantly faster than tera on this benchmark but at least we aren't terribly slower anymore.

For context, we were already faster than tera for

  • Parsing
  • Rendering small templates

Still analyzing the "big data" benchmarks to see how my optimizations did

Geobert Quach
@Geobert
nice change vs last liquid release, good work!
Ed Page
@epage
In case people want to see the full set of benchmarks
https://github.com/cobalt-org/liquid-rust/pull/435/files
There is one result that is still significantly slower than Tera and it should have improved with these recent changes. Something fishy is going on in liquid
Geobert Quach
@Geobert
Did you run a profiler?
Ed Page
@epage
Not yet. I've created an issue to track it when I can more focus on Liquid
(of course anyone else is welcome to dig into it)