wgpubs
(WG)
April 4, 2020, 9:47pm
1
So I have this at the top of my jupyter notebook …
# Cross Entropy Loss and You!
> Meet multi-classification's favorite loss function
- toc: true
- badges: true
- comments: true
- image: images/articles/understanding-cross-entropy-loss-logo.png
- categories: [loss functions, multi-classification]
But a few things things look wonky once I upload it to my repo.
1. The URL to the post comes back as this:
https://mydomain.com/loss%20functions/multi-classification/2020/04/04/understanding-cross-entropy-loss.html
It’s using the “categories” which doesn’t look right.
2. None of the badges show up
Just updated to the very latest so not sure if I’m missing something in the config yml file or what.
Any ideas???
1 Like
wgpubs
(WG)
April 4, 2020, 10:55pm
2
Btw, posted the article here: https://ohmeow.com/2020/04/04/understanding-cross-entropy-loss.html
(notebook is here: https://github.com/ohmeow/ohmeow_website/blob/master/_notebooks/2020-04-04-understanding-cross-entropy-loss.ipynb )
After removing the - categories
, it processed the URL as expected (at least I think that is what its supposed to be).
Still can’t figure out how to get the badges showing up.
hamelsmu
(Hamel Husain)
April 4, 2020, 11:01pm
3
You can set a permalink if you don’t like the autogenerated url
Did you get any build errors or are there any errors in the developer console when previewing this locally?
wgpubs
(WG)
April 4, 2020, 11:15pm
4
Negative. No build errors.
As w/r/t the URL, I don’t have a problem with the generated URL … only that it changes if I add categories/tags to it.
With - categories
its: https://mydomain.com/loss%20functions/multi-classification/2020/04/04/understanding-cross-entropy-loss.html
and with out its: https://ohmeow.com/2020/04/04/understanding-cross-entropy-loss.html
I would expect it would be the later regardless of whether the post is associated to categories or not. That’s what is throwing me off (in addition to the badges not showing)
1 Like
wgpubs
(WG)
April 4, 2020, 11:21pm
5
Figured out the badges part … they weren’t in my config.yml file:
# This specifies what badges are turned on by default for notebook posts.
default_badges:
github: true
binder: true
colab: true
Still unsure about the auto-generated url
hamelsmu
(Hamel Husain)
April 4, 2020, 11:46pm
6
1 Like
wgpubs
(WG)
April 5, 2020, 12:22am
7
Ah … I didn’t know I could customize this globally. Thanks! All looks good now.
i’ve just come up against this too.
jekylls default is nasty, 1) because it doesn’t sluggify the categories (you can use :slugified_categories
if you want them) but mainly 2) because they shouldn’t be there anyway.
if you edit the tags on a post later it breaks the url. if you decided later on to refactor the tags for your entire site you’d be breaking most of your urls.
permalink: /:year/:month/:day/:slug/
or
permalink: /:year/:month/:day/:slug:output_ext
would be better but if you were to change that in fastpages/master would that push it out to the existing sites? (because obviously that would break their urls).
@hamelsmu ? A change to the template repo doesn’t get pushed out to the children, correct?
hamelsmu
(Hamel Husain)
September 1, 2020, 3:21am
10
It doesn’t get pushed, but there is a mechanism to pull. See “Upgrading Fastpages” in the README
hamelsmu
(Hamel Husain)
September 1, 2020, 3:24am
11
Also if you want to cleanup your URL use a permalink https://jekyllrb.com/docs/permalinks/