[fastpages] "Posts" list displays today's date and some titles are missing

First thing, many thanks to all contributors of fastpages, it is an
amazing tool, and it makes the issue I am having all the more frustrating.

I need help troubleshooting the following situation. I don’t know if
it’s with jekyll, github, or fastpages.

Current situation

The GitHub repo of my GitHub page which I am creating with fastpages, contains (at this moment) four notesbooks:

2020-02-20-test.ipynb
2020-03-31-know-your-system.ipynb
2020-04-08-monkey-patching-in-fastai.ipynb
2020-04-10-slimfastai-minimal-imports.ipynb

They all appear to display correctly on the github repo.

However, under “Posts” on the index page of the github page, only:

2020-02-20-test.ipynb
2020-03-31-know-your-system.ipynb

are listed as expected, and the list displays two other items with
only today’s date: “Apr 11, 2020”, see image below:

Note that today’s date is not the date of the other two missing posts, Apr 8 and 10, 2020. This discrepancy with the dates is very puzzling.

How I got there (I think)

  1. At some point I only had two notebooks:
    2020-03-31-know-your-system.ipynb
    2020-04-08-monkey-patching-in-fastai.ipynb
    and the list on the index page displayed correctly.
  2. Then I added 2020-04-10-slimfastai-minimal-imports.ipynb and found myself in the all too common “github page not showing” situation, while the jupyter notebook is present in the repo and looks correct. I checked for the obvious errors, then I thought it may have something to do with the date.
  3. Long story short, I tried a few things, including a couple of git commit --allow-empty, and just to check, I reinstated the test page 2020-02-20-test.ipynb just to see if that worked. I also made a few changes to 2020-04-08-monkey-patching-in-fastai.ipynb just to see if I could verify the changes, and now even 2020-04-08-monkey-patching-in-fastai.ipynb is acting up.

Puzzling
How is it that today’s date is displayed where I expect the two items
corresponding to posts with dates in the past?

Troubleshooting tips?
What should I be looking for under “Actions” or “Workflows” on the
GitHub repository to figure out what is going wrong? Also, I haven’t
seen any error message.

Have you tried previewing your blog locally and looking at the logs? What do the logs say?

Good point, no, I haven’t tried that. I have been having unrelated problems with my jekyll install, getting indecipherable (to me) error messages, and thus I had forgotten about it. Now I have a strong incentive to look into it!

Working on my local engine.

  1. I cloned the fastpages GitHub repo.
  2. After quite a bit of troubleshooting with my local ruby, gem, jekyll, bundler installs, I am finally able to build a website.
  3. Unfortunately, it is incomplete: it only lists two posts (“GitHub actions…” and “An example markdown post”). In particular, it doesn’t generate pages from the Jupyter notebooks. See images below.

I copy the output of bundle exec jekyll serve below the images as well. I don’t see error messages. It seems that GitHub Actions have no effect.

My system:
macOS-10.15.4-x86_64-i386-64bit


$ bundle exec jekyll serve
Configuration file: /Users/antoine/Downloads/fastpages/_config.yml
      Remote Theme: Using theme jekyll/minima
            Source: /Users/antoine/Downloads/fastpages
       Destination: /Users/antoine/Downloads/fastpages/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
      Remote Theme: Using theme jekyll/minima

# a bunch of "warning: Using the last argument as keyword parameters is deprecated" messages

       Jekyll Feed: Generating feed for posts

# more "warning: Using the last argument as keyword parameters is deprecated" messages

                    done in 1.062 seconds.
 Auto-regeneration: enabled for '/Users/antoine/Downloads/fastpages'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

I believe its because you do not have valid YAML in your front matter. As mentioned in the README:

Colons, and other special characters necessitate that you put double quotes around your values

1 Like

I cloned the fastpages repo as is and didn’t make any changes, so I wouldn’t expect the YAML front matter to be problematic. I checked and I don’t see what could be wrong with it. I also added double quotes, resulting in no change.

I see some problems. Try taking out the problematic characters

Problem 1 you have an asterisk in the description

Problem 2 - you have a colon in the description

1 Like

I don’t understand this, it looks like you have new posts in your repo with problematic front matter?

Thanks for reacting so quickly!

My apologies, I should have clarified that I am talking about the repository from https://github.com/fastai/fastpages, not my own project at https://github.com/antoinechoffrut/fastai-companion.

I am not able to generate locally the following notebooks:

2020-02-20-test.ipynb with front matter:

# Fastpages Notebook Blog Post
> A tutorial of fastpages for Jupyter notebooks.

- toc: true 
- badges: true
- comments: true
- categories: [jupyter]
- image: images/chart-preview.png

2020-02-21-introducing-fastpages.ipynb:

# Introducing fastpages
> An easy to use blogging platform with extra features for Jupyter Notebooks.

- toc: true 
- badges: true
- comments: true
- author: Jeremy Howard & Hamel Husain
- image: images/diagram.png
- categories: [fastpages, jupyter]

I have taken a step back from my original issue and am currently troubleshooting my own local web engine with jekyll. I do realise that this (second) issue has nothing to do with fastpages, I hope someone will be able to give me tips on how to troubleshoot it.

In the meantime, your points are very well taken and I will correct the YAML front matter on my own notebooks! Thanks!

1 Like

If you create a fresh repo by creating a template (not forking) then everything works for me. I cannot reproduce your issue. So not sure how to help.

A happy update: both problems solved!

  1. Indeed, invalid YAML in the front matter to the notebooks was the problem on my project. Thanks in particular for pointing me to the Customizing blog posts with front matter section of the fastpages README.
  2. I was naively assuming that I could run GitHub Actions locally on my machine, but actually this requires some extra work. Eventually I found your Development Guide and I can now preview my project using Docker containers on my laptop before pushing.

Many thanks for the time you have taken to look at all my questions. I was really bogged down and now I can move on using fastpages. Phenomenal!

Glad to hear it thanks!

Hi Antoine,

I have made a post here about how my notebooks are not getting rendered in my local machine.

So i should install docker and then somehow if I type make in my local folder it will serve the site?
Is this what I am missing? or are there some steps inbetween?

Can it be done without docker? Thanks.

The reason for Docker is to isolate your environment to be more stable which is the best way to troubleshoot. Please follow the troubleshooting guide

1 Like

Fewf, it’s been a super long time since I have worked with fastpages!

Just wanted to give a quick reply that, at the time I set it up, I didn’t know any other way to view your page locally.

If I remember correctly, I type make server once docker is launched (not just make).

As Hamel is suggesting, do go through the troubleshooting page. But I would add googling around might help as well, as there may be some things not spelled out for the novice.

When I set up my page, I don’t think the troubleshooting page explained anything about docker, but the information is easily found after a search using the obvious keywords.

Hope this helps…

2 Likes

Hi @hamesmu, don’t we already have bundler, gemfile.lock to control environment on jekyll side… and conda for python side? What am I missing?

Thanks for the response. Yes I read the entire trouble shooting guide and it took me to this page. But this sounds like a blackbox to me (when I clicked the makefile link it took me to GNU site rather than say a bash file of commands). What does it actually do? Where can I find more info on it?

Thanks a lot for all the help. :slight_smile:

P.S
Are there other posts where people host their website locally, not using docker? :slight_smile:

I dont’ know what I am doing BUT…

Got some errors after installing Docker asking to install docker-compose. Followed the website again.

When I ran make server I got “Permission denied” error. sudo make server takes some time but hosts everything properly locally. :slight_smile:

You are welcome to give it a try, however since Actions run on Docker there is no guarantee that what you see locally will match what’s hosted if you try to use something outside Docker but you are welcome to try!

1 Like