Skip to content

Undefined title_sidebar#1175

Merged
jcb91 merged 2 commits intomasterfrom
toc2-smallpatch-nonexisting-tilesidebar
Dec 19, 2017
Merged

Undefined title_sidebar#1175
jcb91 merged 2 commits intomasterfrom
toc2-smallpatch-nonexisting-tilesidebar

Conversation

@jfbercher
Copy link
Copy Markdown
Member

In some "old" exported html files, with toc2 embedded, the cfg.title_sidebar is not defined; This tests for the cfg key and define it if necessary (Otherwise the sidebar title appears as "undefined")

In some "old" exported html files, with toc2 embedded, the `cfg.title_sidebar` is not defined; This tests for the cfg key and define it if necessary (Otherwise the sidebar title appears as "undefined")
@jcb91
Copy link
Copy Markdown
Member

jcb91 commented Dec 18, 2017

This (along with all metadata values) should already have a default value in the newest version? Is that not working correctly?

@jfbercher
Copy link
Copy Markdown
Member Author

Yes, with current version and conversions, but already converted notebooks do not have all variables defined. See eg this example.

Of course I can easily update my own files (I have a bunch of lectures in ipynb/html formats), but there can be some other floating in the web.

@jcb91
Copy link
Copy Markdown
Member

jcb91 commented Dec 19, 2017

Oh, I'm all for having defaults! I just thought that this (and similar issues) would be handled by 1972313, but it seems I forgot that the read_config method which defines the defaults isn't called in non-live notebooks 😞.

I've pushed a commit which should ensure defaults are set for all config values...

@jcb91 jcb91 merged commit 5b89c50 into master Dec 19, 2017
@jcb91
Copy link
Copy Markdown
Member

jcb91 commented Dec 19, 2017

Seems to work for the title :)

@jfbercher
Copy link
Copy Markdown
Member Author

Well done!

@jcb91 jcb91 deleted the toc2-smallpatch-nonexisting-tilesidebar branch December 21, 2017 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants