Strange behavior with

I’m using Hugo for my course website. I did so for an earlier version of the course in Fall 2017 and it worked without any problems. Then for the Fall 2020 version, in content/ I copied over what was in the fall17 directory to a new fall20 directory and made some minor changes the text. Now I get some weird behavior (compare with

  • The navbar is all wrong; it should be like the subpage syllabus on fall20/ (sorry but the discussion forum won’t let me put > 2 links in this post, else I would have written the link in full!)
  • “Sketching Algorithms” for some reason appears twice at the top.
  • There should be no text under “linear algebra”, but other text is randomly showing up (seems to be text from the syllabus and project subpages of fall20/).

What I thought should display at fall20/ is what’s in content/fall20/ That file is very similar to content/fall17/, which seems to be working just fine. Any ideas what might be causing the fall20 issues?

Some more info:

  • Here’s a copy of

    date = “2020-08-01T00:00:00”
    draft = false
    title = “Sketching Algorithms”
    type = “class”
    section_id = 10
    weight = 10

    title = “Home”
    url = “can’t put > 2 links”
    title = “Lectures”
    url = “can’t put > 2 links”
    title = “Assignments”
    url = “can’t put > 2 links”
    title = “Syllabus”
    url = “can’t put > 2 links”
    title = “Project”
    url = “can’t put > 2 links”
    title = “Piazza”
    url = “hugo discussion forum won’t let me put > 2 links”
    title = “Staff”
    url = “can’t put > 2 links”

    Sketching Algorithms

    CS 294-165 - Fall 2020 ([Syllabus](can’t put > 2 links))

    Sketching algorithms compress data in a way that is still useful for answering some pre-specified family of queries, possibly across datasets by comparing sketches. This course will cover mathematically rigorous models for developing such algorithms, as well as some provable limitations of algorithms operating in those models. Some topics covered include:

    • Streaming algorithms. Compute useful statistics over a dataset making only one pass over it, while using little memory.

    • Dimensionality reduction. General techniques and impossibility results for reducing data dimension while still preserving geometric structure.

    • Randomized linear algebra. Algorithms for big matrices (e.g. a user/product rating matrix for Netflix or Amazon). Regression, low rank approximation, clustering, etc.

    • Compressed sensing. Recovery of (approximately) sparse signals based on few linear measurements.

      This is a graduate course, though there may be room for a limited number of advanced undergraduate students satisfying the following prerequisites: mathematical maturity and comfort with algorithms (e.g. CS 170), discrete probability, and linear algebra.

  • content/ has in it fall17/ fall20/ and home/ subdirectories. Each of fall17/ and fall20/ have their own files,,,,, and If I go to any of the subpages of fall20, they seem to work, e.g. fall20/hmwk. But going to the index file is giving this weird behavior, though again, fall17/ works perfectly though.

I’m happy to answer any further questions that might help diagnose this. Thank you!

EDIT: I thought maybe the problem was I should be using and not, so I made that change. It now works locally when I do hugo server, but it still is rendering weirdly when I deploy online.

There’s been quite a few changes since 2017.

  • Which Hugo version and theme version were you on vs which one currently?

  • It is probably around the .Pages variable:

  • It would be easier to help if we can see the source in a repo

1 Like

Thanks for your response @pointyfar.

  • I’m now using hugo v0.40.1. I don’t know what version I was using in 2017.
  • I looked at the link you posted about .Pages, but I wasn’t sure how to apply it.
  • The source was in a private repo. I’ve now copied it to a public repo:

EDIT: That hugo version is what I have locally. I just noticed that netlify, which I’m using for deployment, is using Hugo 0.26. Also, I’m using the Academic theme.

OK sorry for wasting everyone’s time. After looking through the repo more carefully I realized I must have come across the same issue in Fall 2017 as well, and hack-fixed it by creating a new layouts/fall17/list.html. I copied that into layouts/fall20/list.html and now it works.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.