Jupyter-book: Issues and Repository button not appearing

Created on 31 Aug 2020  路  10Comments  路  Source: executablebooks/jupyter-book

I am hoping to give my book the "link to repository", "open issue", and "suggest edits" functionality. Currently, my configuration looks like this

repository: 
  url: https://github.com/dafriedman97/mlbook


html:
  favicon: logo.png
  home_page_in_navbar: false
  use_edit_page_button: true
  use_issues_button: true
  use_repository_button: true

but on the book itself, I only see the button for "suggest edit", rather than the buttons for "use repository" and "issues". This can be seen from any page on the book. Any idea why I'm not seeing these other two buttons?

Thanks so much and please let me know if there is any additional information I can provide.

bug

Most helpful comment

@dafriedman97 There is a warning in the docs to avoid mixing toc structures:

When designing the top-level sections of your _toc.yml file, you must pick either a list of chapters via - file: entries, or a list of parts via - part: entries with chapters inside of them. You cannot intermix them both.

Try commenting out the two - file: entries for table of contents and conventions_notation or adjust your structure to fit one of the two suggested formats.

All 10 comments

Hey there - it's hard to help you if you don't fill out answers to the questions that are asked in the issue template. Please fill them out so others know what configuration you're using etc.

sorry about that--I updated the initial post. Please let me know if anything else is missing

This is a bug that should be fixed shortly in v0.8

v0.8 is now out, can you give it a go and see if this is still an issue?

Just upgraded and I'm running into an issue (probably on my end). My toc looks like this

Screen Shot 2020-09-01 at 12 34 46 PM

but I'm getting this error

Screen Shot 2020-09-01 at 12 35 16 PM

Can you tell what I'm doing wrong? Also please let me know how I can provide more information if needed. Thanks!

@dafriedman97 There is a warning in the docs to avoid mixing toc structures:

When designing the top-level sections of your _toc.yml file, you must pick either a list of chapters via - file: entries, or a list of parts via - part: entries with chapters inside of them. You cannot intermix them both.

Try commenting out the two - file: entries for table of contents and conventions_notation or adjust your structure to fit one of the two suggested formats.

Apologies, I hadn't read the updated table of contents instructions.

To answer the original question, yes that worked! Thank you so much.

One new issue, though. The spacing between the "part" headers and "chapter" listings is looking funny (maybe something I'm doing?)

It looks like this right now. Note that "introduction", "1. Ordinary Least Squares" and "2. Linear Regression Extensions" are the chapter titles, though that is misleading in this picture. Do you know how I can change that? And also, could I make them bigger or bold? Thanks!

Screen Shot 2020-09-01 at 5 42 43 PM

One other thing with the "edit" button (and if this is unrelated, let me know and I'll raise a new issue)鈥攚hen I click "edit" it goes to https://github.com/dafriedman97/mlbook/edit/master/content/introduction.md which is unfortunately not a valid link. The same link with html DOES exist, however (https://github.com/dafriedman97/mlbook/edit/master/content/introduction.md). Any idea how I can change that? Thanks so much

Hmm I think issues are getting conflated now.

RE: bolding issue and parts, perhaps that's related to #921 ?

I tried to build your book but there were several errors (see below).

I'm not a repo maintainer but I suggest update to jupyterbook 0.8, resolve the build errors, and see if the problem persists. If so, perhaps you could open a new issue with what you see?

Error details

Running Jupyter-Book v0.8.0
Source Folder: /Users/firasm/junk/mlbook
Config Path: /Users/firasm/junk/mlbook/_config.yml
Output Path: /Users/firasm/junk/mlbook/_build/html

===============================================================================

Warning: Validation errors in config:

  • '' is not of type 'null', 'array' [key path: 'sphinx/extra_extensions']
  • None is not of type 'string' [key path: 'title']

===============================================================================

Running Sphinx v2.4.4
making output directory... done
WARNING: logo file 'titlelogo.png' does not exist
WARNING: favicon file 'logo.png' does not exist
myst v0.12.8: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_enable=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, amsmath_enable=False, deflist_enable=False, update_mathjax=True, admonition_enable=False, figure_enable=False, disable_syntax=[], html_img_enable=False, url_schemes=['mailto', 'http', 'https'])
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: [new config] 0 added, 0 changed, 0 removed

Sphinx error:
master file /Users/firasm/junk/mlbook/content/introduction.rst not found
Traceback (most recent call last):
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/jupyter_book/sphinx.py", line 141, in build_sphinx
app.build(force_all, filenames)
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/sphinx/application.py", line 349, in build
self.builder.build_update()
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 297, in build_update
self.build(to_build,
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 311, in build
updated_docnames = set(self.read())
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 421, in read
raise SphinxError('master file %s not found' %
sphinx.errors.SphinxError: master file /Users/firasm/junk/mlbook/content/introduction.rst not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/firasm/.pyenv/versions/3.8.3/bin/jb", line 8, in
sys.exit(main())
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(args, *kwargs)
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(
args, **kwargs)
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/jupyter_book/commands/__init__.py", line 259, in build
builder_specific_actions(
File "/Users/firasm/.pyenv/versions/3.8.3/lib/python3.8/site-packages/jupyter_book/commands/__init__.py", line 485, in builder_specific_actions
raise RuntimeError(_message_box(msg, color="red", doprint=False)) from result

RuntimeError:

There was an error in building your book. Look above for the cause.

===============================================================================

Thanks @firasm, I do think it might be related to #921.

I've updated to v0.8 and I actually don't get those errors when using the gh-pages branch (only the master branch). I'll go ahead and open up a new issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomDonoghue picture TomDonoghue  路  4Comments

Cyb3rWard0g picture Cyb3rWard0g  路  5Comments

rickwierenga picture rickwierenga  路  3Comments

firasm picture firasm  路  5Comments

mmcky picture mmcky  路  5Comments