fixed opening book on win (#9622)

This commit is contained in:
Maddy
2020-03-13 19:20:51 -07:00
committed by GitHub
parent 6a1037ab2d
commit d6d33165f1
2 changed files with 7 additions and 47 deletions

View File

@@ -39,5 +39,5 @@
"title.openJupyterBook": "Open Jupyter Book",
"title.closeJupyterBook": "Close Jupyter Book",
"title.revealInBooksViewlet": "Reveal in Books",
"title.createJupyterBook": "Create Book"
"title.createJupyterBook": "Create Book (Preview)"
}

View File

@@ -23,7 +23,7 @@
{
"cell_type": "markdown",
"source": [
"# Jupyter Books\n",
"# Create Jupyter Book\n",
"\n",
"## 1. Installation\n",
"\n",
@@ -183,48 +183,6 @@
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"source": [
"### <span style=\"color:red\">Issue:</span> generate_toc.py is missing\r\n",
"\r\n",
"Jupyter Book uses the Table of Contents to define the structure of your book. For example, your chapters, sub-chapters, etc.\r\n",
"\r\n",
"Need to manually modify the Table of Contents (located here: mybookname/_data/toc.yml) following structure below:\r\n",
"\r\n",
"```\r\n",
"- title: mytitle # Title of chapter or section\r\n",
" url: /myurl # URL of section relative to the /content/ folder.\r\n",
" sections: # Contains a list of more entries that make up the chapter's sections\r\n",
" not_numbered: true # if the section shouldn't have a number in the sidebar\r\n",
" (e.g. Introduction or appendices)\r\n",
" expand_sections: true # if you'd like the sections of this chapter to always\r\n",
" be expanded in the sidebar.\r\n",
" external: true # Whether the URL is an external link or points to content in the book\r\n",
"```\r\n",
"\r\n",
"Example from demo book:\r\n",
"\r\n",
"```\r\n",
"- title: Getting started\r\n",
" url: /guide/01_overview\r\n",
" not_numbered: true\r\n",
" expand_sections: true\r\n",
" sections:\r\n",
" - title: Create your book\r\n",
" url: /guide/02_create\r\n",
" - title: Build and publish your book\r\n",
" url: /guide/03_build\r\n",
" - title: FAQ\r\n",
" url: /guide/04_faq\r\n",
" - title: How-to and advanced topics\r\n",
" url: /guide/05_advanced\r\n",
"```"
],
"metadata": {
"azdata_cell_guid": "5439d5e9-6a98-4255-8afa-3c2ba48bfc7e"
}
},
{
"cell_type": "markdown",
"source": [
@@ -241,7 +199,8 @@
"import re, os\r\n",
"from IPython.display import *\r\n",
"if os.name == 'nt':\r\n",
" display(HTML(\"<h2><b><a href=\\\"command:bookTreeView.openBook?&quot;\"+str(re.escape(book_name))+\"&quot;\\\"><font size=\\\"3\\\">Click here to open your Book in ADS</font></a></b></h2>\"))\r\n",
" bookPath = book_name.replace('\\\\', '\\\\\\\\')\r\n",
" display(HTML(\"<h2><b><a href=\\\"command:bookTreeView.openBook?&quot;\"+str(bookPath)+\"&quot;\\\"><font size=\\\"3\\\">Click here to open your Book in ADS</font></a></b></h2>\"))\r\n",
"else:\r\n",
" display(HTML(\"<h2><b><a href=\\\"command:bookTreeView.openBook?&quot;\"+str(book_name)+\"&quot;\\\"><font size=\\\"3\\\">Click here to open your Book in ADS</font></a></b></h2>\"))"
],
@@ -258,7 +217,7 @@
"<span style=\"color:red\">**Note**: On clicking the above link, we create a temporary toc.yml file for your convenience.</span>\r\n",
"\r\n",
" Please update that file inside your book (located at: *YourbookPath*/_data/toc.yml) if you want to further customize your book following \r\n",
" the above instructions or https://jupyterbook.org/guide/01-5_tour.html#Table-of-Contents.\r\n",
" instructions at https://jupyterbook.org/guide/01-5_tour.html#Table-of-Contents.\r\n",
""
],
"metadata": {
@@ -271,7 +230,8 @@
"display(HTML(\"<h1><b>That's it!</b></h1><br/><p>You are good to view your book in Azure Data Studio by clicking on the above link.</p>\"))"
],
"metadata": {
"azdata_cell_guid": "bd2fe173-66ce-48b3-8dc3-c4d7560953c8"
"azdata_cell_guid": "bd2fe173-66ce-48b3-8dc3-c4d7560953c8",
"tags": []
},
"outputs": [],
"execution_count": null