Coder Social home page Coder Social logo

Randomize order of themes about jekyllthemes HOT 11 CLOSED

jekyllrc avatar jekyllrc commented on September 27, 2024
Randomize order of themes

from jekyllthemes.

Comments (11)

jacobtomlinson avatar jacobtomlinson commented on September 27, 2024

I've thought along similar lines and I did raise an issue on jekyllthemes.org along these lines a while back.

My ideal scenario would be to sort by date added automatically but then allow reordering alphabetically (which looks like it's already there), and by stars on GitHub. That would require some interesting scripting and may end up having to be a build time feature as I'm sure GitHub wouldn't want us making multiple API calls for every page load, however that conflicts with my desire to keep this simple GitHub pages with no build scripts.

Random could also be good as it would allow less popular themes to get to the top of the list.

from jekyllthemes.

erlend-sh avatar erlend-sh commented on September 27, 2024

Yeah, I like the simplicity of a randomised order.

I don't really like the common practice of pushing the repos with many stars to the top. It's a bit of a "the rich get richer" sort of thing; you're rewarding the repos with good publicity with more publicity.

If I were to suggest a more advanced approach for a later iteration, I'd go with something like:

Randomise order within 4 different groupings (not necessarily with visible headers on the page) based on "freshness" of the code:

  • New (theme was updated in the last 2 months)
  • Recent (2-6)
  • Aging (6-12)
  • Old (12+)

This encourages developers to try by every once in a while and check that everything's OK, without really being able to game the system.

from jekyllthemes.

daattali avatar daattali commented on September 27, 2024

I also prefer not to default to "most popular" and I think a random order would be the most fair by default. @mushishi78 as the maintainer of this repo, what do you think?

from jekyllthemes.

gynter avatar gynter commented on September 27, 2024

Hmm we could indeed drop the whole list into a minified json file (date, title, author, thumbnail), then order it via javascript. This would also give the possibility to make loading while scrolling (i.e imgur style, also described in #2 (comment)), make a search box using js, and create fast filters using js (i.e select author from drop down etc).

from jekyllthemes.

daattali avatar daattali commented on September 27, 2024

@gynter yes that's a possibility. It can also be as simple as literally just putting some javascript that on page load looks at all the

  • tags in the theme list and just reorganizes them randomly. It's a bit more hacky I suppose.

  • from jekyllthemes.

    gynter avatar gynter commented on September 27, 2024

    I'd like that more, because since then for people like me, who have javascript disabled by default, can still see the content.

    from jekyllthemes.

    mushishi78 avatar mushishi78 commented on September 27, 2024

    @daattali All these guys are maintainers now, I've just been doing a lot over the last few days.

    @gynter I would put the data straight into the javascript file, as that's one less file to load and we don't have to add an ajax library to request it.

    We could also query GitHub for stats to get a feel for how well maintained the repo is.

    We could also add tags to the projects to filter by.

    I like the 'freshness' idea as default.

    from jekyllthemes.

    mushishi78 avatar mushishi78 commented on September 27, 2024

    I've added alphabetical, latest and shuffle to the main branch, with shuffle as default and no change for javascript turned off. But we can leave this issue open to discuss improvements.

    from jekyllthemes.

    daattali avatar daattali commented on September 27, 2024

    Nice! Thanks!

    from jekyllthemes.

    jacobtomlinson avatar jacobtomlinson commented on September 27, 2024

    This is cool!

    Just a note on the sort by most stars. I think it is important to allow users to do that as I think they will want it. However I agree that it should not be the default.

    from jekyllthemes.

    mushishi78 avatar mushishi78 commented on September 27, 2024

    Added sort by stars.

    from jekyllthemes.

    Related Issues (12)

    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.