mkdocs-material / create-blog

Create a blog
https://squidfunk.github.io/mkdocs-material/
Other
14 stars 2 forks source link

Invalid datetime format error upon using this template #1

Closed birdybro closed 2 months ago

birdybro commented 2 months ago

See the logs for the default behavior currently.

https://github.com/birdybro/birdybro.github.io/actions/runs/9950026929/job/27487229296

alexvoss commented 2 months ago

Um, the log seems to point to a Jekyll build?

birdybro commented 2 months ago

I clicked use this template to test it out. The instructions don't specify anything else and the material for mkdocs site links directly to this repo. Has anyone else used this as a template so far so I could compare to see what they did to fix this?

alexvoss commented 2 months ago

You cloned the template into your own repository and a Jekyll build ran? That does seem odd but it looks like by adding a GitHub Actions configuration, you are now actually running a MkDocs build and are running into the next problem, which is progress.

Error: MkDocs encountered an error parsing the configuration file: while constructing a Python object
cannot find module 'ext.slugs' (No module named 'ext')
  in "/home/runner/work/birdybro.github.io/birdybro.github.io/mkdocs.yml", line 22, column 21

This comes from the custom slug function example in the tutorial. If you don't need that then you can simply remove that declaration from the plugin configuration in mkdocs.yml. If you do want to use this, you will need to set PYTHONPATH=. in your environment so that the code in ext/ is found.

I should probably add this to the description of the template as well as to the tutorial.

birdybro commented 2 months ago

Thanks!

Yeah I was basically testing it blind on purpose since I just wanted to fire up the blog feature and try it out.

Not sure why this jekyll page thing is happening. I got the ci action worked out, had to open up permissions as well as do what you said. Also had to comment out the meta plugin since that's insiders only.

birdybro commented 2 months ago

Oh I think I know why, because the whole $github_username.github.io is a special repo name so when you enable pages there it might be pushing it as a jekyll build no matter what.

birdybro commented 2 months ago

https://github.com/birdybro/blogtest - tried a repo rename, that's not it... hrmm

birdybro commented 2 months ago

There we go, fixed, changed target branch of pages settings to gh-pages, now I'm starting to remember again. Been awhile since I last set this all up. Thanks!

https://birdybro.github.io/blogtest/