Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement static generation and github hooks #12

Open
doppioslash opened this Issue Sep 6, 2016 · 17 comments

Comments

Projects
None yet
6 participants
@doppioslash
Copy link
Owner

doppioslash commented Sep 6, 2016

This requires cobalt-rs to support data files.

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Sep 7, 2016

Turns out by automating we'd get a lot of wrong info, because people don't keep their crates.io library entries up-to-date...

@viperscape

This comment has been minimized.

Copy link

viperscape commented Jun 12, 2017

Hi, do you have a separate repo containing any automation work for this yet? I had some ideas

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Jun 12, 2017

No, I don't. Only researched how arewewebyet was doing it, and figuring out that cobalt lacks the data files feature that they use from Jekyll.

@viperscape

This comment has been minimized.

Copy link

viperscape commented Jul 27, 2017

Hey, sorry been super busy but wanted to look at this again :) What do you mean by data files?

"Turns out by automating we'd get a lot of wrong info, because people don't keep their crates.io library entries up-to-date..."
I think even if the information was out of date, the crates.io info should be used to drive this if possible. You could have a list here that is appended to, specifying the registered crate name. The site could rebuild when PRd and pull data from crates.io if possible, then use something like handlbars templating to render the results (eg: https://github.com/sunng87/handlebars-rust/blob/master/examples/render_file/template.hbs)

Also, just saw this pop up on my radar: https://bitbucket.org/Alex_PK/strange/

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Jul 27, 2017

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Jul 27, 2017

at a first look strange seems to have that feature

@viperscape

This comment has been minimized.

Copy link

viperscape commented Aug 1, 2017

I have forked and started proceeding on the autogenerating code

https://github.com/viperscape/arewegameyet

so far it parses crates based on a list, next up it will render the Crate objects into basic html snippets (probably using mustache)

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Aug 1, 2017

Cool!

@viperscape

This comment has been minimized.

Copy link

viperscape commented Aug 3, 2017

Given this generic crate view: https://github.com/viperscape/arewegameyet/blob/master/views/crates.html
and these crates: https://github.com/viperscape/arewegameyet/blob/master/config/categories.toml#L6
it can render this output: https://github.com/viperscape/arewegameyet/blob/master/build/scripting.html

I think functionality wise, this is in pretty good shape, I am only taking in these crate attributes from crates.io:

#[derive(Debug,RustcEncodable)]
pub struct Crate {
    name: String,
    version: String,
    description: String,
    license: String,
    repository: String
}

So if we want more, we'll have to add them in to the parser.

I moved your original site files into static for now, and the output generated goes in to Build. I think it will make more sense to have everything in a subdir called site. That will take some organization and updating of the static assets. It also looks like the css should be put in to a css file. Take a look and maybe tinker, let me know what you think!

@GloverDonovan

This comment has been minimized.

Copy link

GloverDonovan commented Mar 25, 2018

Bumping this. I'd like to see #7 fixed as well!

@viperscape I looked through your fork and it seems much better than how things are handled now. Is there any update on whether or not this change is welcome?

@viperscape

This comment has been minimized.

Copy link

viperscape commented Mar 26, 2018

@GloverDonovan Thanks! No response, my guess is this is low on @doppioslash totem pole 😄 Like I said, it would take some rework on the static assets side, but shouldn't be too bad really.

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Aug 20, 2018

Yeah, sorry, it's been busy year. But it's great what you did @viperscape
Maybe send a PR with what you have?
I should be to have some time to help with this next week.

@doppioslash doppioslash changed the title Move to cobalt-rs Implement static generation and github hooks Aug 29, 2018

@piedoom

This comment has been minimized.

Copy link
Contributor

piedoom commented Nov 15, 2018

Hi! Would you consider using Gutenberg? Its written in Rust and has support for data files. I've been using it for quite some time and love it. https://github.com/Keats/gutenberg/

Here is the PR in question getzola/zola#476 I believe it will be in the next release which should be dropping soon. (Note that it is changing the name to Zola due to wordpress seo stuff). I would be happy to assist.

@doppioslash

This comment has been minimized.

Copy link
Owner Author

doppioslash commented Nov 20, 2018

Hey @piedoom, yeah I would consider that.

@erlend-sh

This comment has been minimized.

Copy link
Contributor

erlend-sh commented Jan 11, 2019

#128 solves this. I've started an issue to discuss further enhancements in #151.

@mbillingr

This comment has been minimized.

Copy link
Contributor

mbillingr commented Jan 15, 2019

The order in which crates are listed on the category pages seems quite arbitrary. They appear in the same order they are listed in the data file. It would be nice if there was some consistent order...

Does Zola support automatic sorting of items by name or meta data (such as number of downloads)?

@piedoom

This comment has been minimized.

Copy link
Contributor

piedoom commented Jan 21, 2019

Good idea. I'll look into it, I think it might be able to be accomplished with this. I'll open up a separate issue.

@piedoom piedoom referenced this issue Jan 21, 2019

Open

Sort entries #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.