Giter VIP home page Giter VIP logo

Comments (15)

matthewmccullough avatar matthewmccullough commented on August 22, 2024

So incredibly frustrating. I've attempted to use all methods of sorting (they work locally on my machine) and none of them seem to take effect on the server side. I even just attempted a Liquid sort criteria. Had no effect. What in the world is going on? Help!

from teach.github.com.

brntbeer avatar brntbeer commented on August 22, 2024

yeah it looks like our sortby on the forloop should work but it doesnt :( agree at frustration.

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

@cobyism Any insights here? Driven crazy by inability to sort the elements on this page. They literally look random.

from teach.github.com.

cobyism avatar cobyism commented on August 22, 2024

The dates themselves should be doing the sorting just fine (otherwise this would be a problem for approximately everyone who uses Jekyll), so I have no idea why there is a discrepancy between the order generated locally and the order generated on the gh-pages server. @jch Do you have any idea why this might be the case?

As far as the sort syntax being used for the index page in question though, to the best of my knowledge it doesn’t actually exist in Liquid proper. There’s a pull request that adds it at Shopify/liquid#101, but it looks like that’s not been merged (see also jekyll/jekyll#766).

from teach.github.com.

cobyism avatar cobyism commented on August 22, 2024

One factor that might be in play here is the use of the site.html_pages hash (as opposed to having everything in /classnotes/_posts and using site.categories.classnotes hash) to access the list—maybe that’s where the screwy order is coming from? @matthewmccullough Have you tried moving /classnotes/* (except the index.md) into /classnotes/_posts/* and then doing the loop like:

<ul>
  {% for post in site.categories.classnotes reversed %}
      <li></li>
  {% endfor %}
</ul>

v0v

from teach.github.com.

jch avatar jch commented on August 22, 2024

Sorry, but I actually don't know anything about Jekyll. Not sure how that rumor got started heh. 

Jerry Cheung
GitHub Enterprise Engineer

On Fri, Mar 15, 2013 at 4:29 AM, Coby Chapple [email protected]
wrote:

One factor that might be in play here is the use of the site.html_pages hash (as opposed to having everything in /classnotes/_posts and using site.categories.classnotes hash) to access the list—maybe that’s where the screwy order is coming from? @matthewmccullough Have you tried moving /classnotes/* (except the index.md) into /classnotes/_posts/* and then doing the loop like:

<ul>
  {% for post in site.categories.classnotes reversed %}
      <li></li>
  {% endfor %}
</ul>

v0v

Reply to this email directly or view it on GitHub:
#76 (comment)

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

Locally, it sorts just fine:

Screen Shot 2013-03-16 at 4 32 58 PM

Remotely at http://teach.github.com/classnotes/, I can't decipher what the ordering is controlled by.

Screen Shot 2013-03-16 at 4 34 32 PM

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

@cobyism your tactic works, but that's going to be a bit of a hassle to convert and maintain; I think I'd need to set the permalink on each and every one of the new pages so that it rendered at the old URL, right? Or at least put in JS redirect for all the old pages to point to the new locations.

I implemented a draft first step of this approach you suggested: #97

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

We have some modestly labor-intensive workarounds that work, but I'm wondering if I can call upon you @parkr to throw any light on the sort order problem I'm seeing in the above screenshots and to see if he has any last minute tips besides the workaround that @cobyism suggested (that works, but requires band-aiding the old URLs).

Recap: Locally, the category iterator sorts by filename/date. On GitHub, it sorts in an unknown order. Anything I'm mis-using with Jekyll that is causing this sorting to be different on GitHub than locally-run Jekyll v0.12.1, @parkr?

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

We internally discussed this and we don't want to present the global list of class notes to future students. We'd like to make it intimate in that each class gets their link, but doesn't have to wade through others. The teaching materials should be a great reference for all students moreso than browsing other classes' class notes.

from teach.github.com.

matthewmccullough avatar matthewmccullough commented on August 22, 2024

CC: @jordanmccullough

from teach.github.com.

randomecho avatar randomecho commented on August 22, 2024

That whole chunk between the presenter details and log & transcript could probably also be whisked away to a single point to avoid repeating that section every time.

from teach.github.com.

jordanmccullough avatar jordanmccullough commented on August 22, 2024

@randomecho: I have a yet-to-be-PRed effort underway to template the Class Notes so that the resource links, training information, etc. are all external Markdown files from the class-specific content.

If I understand correctly, that's also what your'e suggesting in the "avoid repeating" comment and I totally dig that idea. 👍

from teach.github.com.

randomecho avatar randomecho commented on August 22, 2024

@jordanmccullough Yes, actually. Saw something like {include:file:LICENSE.md} on some other repo a while back where it dropped in the file on the live render. Forgot about it until watching the consolidation going on here.

from teach.github.com.

jordanmccullough avatar jordanmccullough commented on August 22, 2024

The modular classnotes effort is now happening here: github/training.github.com#149

from teach.github.com.

Related Issues (20)

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.