浏览代码

Merge pull request #1747 from blink1073/check-links

Check links on CI
Afshin Darian 8 年之前
父节点
当前提交
2caccfd070
共有 5 个文件被更改,包括 17 次插入3 次删除
  1. 4 0
      scripts/travis_script.sh
  2. 1 1
      tutorial/adding_content.md
  3. 10 0
      tutorial/conf.py
  4. 1 1
      tutorial/documents.md
  5. 1 1
      tutorial/labextensions.md

+ 4 - 0
scripts/travis_script.sh

@@ -38,6 +38,10 @@ if [[ $GROUP == coverage_and_docs ]]; then
     # Run the coverage check.
     # Run the coverage check.
     npm run test:coverage
     npm run test:coverage
 
 
+    # Run the link check
+    pip install -q pytest-check-links
+    py.test --check-links -k .md .
+
     # Build the docs
     # Build the docs
     npm run docs
     npm run docs
     cp jupyter-plugins-demo.gif docs
     cp jupyter-plugins-demo.gif docs

+ 1 - 1
tutorial/adding_content.md

@@ -15,7 +15,7 @@ files: `npm install -g tsd`.
 - If creating CSS, import them in `src/default-themes/index.css`.
 - If creating CSS, import them in `src/default-themes/index.css`.
 - The `index.ts` file should have the core logic for the plugin.  In
 - The `index.ts` file should have the core logic for the plugin.  In
 this case, it should create a widget and widget factory for rendering geojson 
 this case, it should create a widget and widget factory for rendering geojson 
-files (see [Documents](documents.html)).
+files (see [Documents](documents.md)).
 - The `plugin.ts` file should create the extension and add the content
 - The `plugin.ts` file should create the extension and add the content
 to the application.  In this case registering the widget factory using
 to the application.  In this case registering the widget factory using
 the document registry.
 the document registry.

+ 10 - 0
tutorial/conf.py

@@ -23,6 +23,7 @@ import shlex
 
 
 # For conversion from markdown to html
 # For conversion from markdown to html
 import recommonmark.parser
 import recommonmark.parser
+from recommonmark.transform import AutoStructify
 
 
 # Set paths
 # Set paths
 #sys.path.insert(0, os.path.abspath('.'))
 #sys.path.insert(0, os.path.abspath('.'))
@@ -325,6 +326,7 @@ texinfo_documents = [
      'Miscellaneous'),
      'Miscellaneous'),
 ]
 ]
 
 
+
 # Documents to append as an appendix to all manuals.
 # Documents to append as an appendix to all manuals.
 #
 #
 # texinfo_appendices = []
 # texinfo_appendices = []
@@ -352,3 +354,11 @@ if not on_rtd:
     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 
 # readthedocs.org uses their theme by default, so no need to specify it
 # readthedocs.org uses their theme by default, so no need to specify it
+
+
+# See http://recommonmark.readthedocs.io/en/latest/auto_structify.html
+def setup(app):
+    app.add_config_value('recommonmark_config', {
+        'enable_auto_doc_ref': True
+    }, True)
+    app.add_transform(AutoStructify)

+ 1 - 1
tutorial/documents.md

@@ -4,7 +4,7 @@ JupyterLab can be extended in two ways via:
 
 
 - application plugins (top level): Application plugins extend the
 - application plugins (top level): Application plugins extend the
   functionality of JupyterLab itself, and we cover them in the
   functionality of JupyterLab itself, and we cover them in the
-  [Plugins](plugins.html) tutorial focuses.
+  [Plugins](plugins.md) tutorial focuses.
 - **document widget extensions (lower level):** Document widget extensions extend
 - **document widget extensions (lower level):** Document widget extensions extend
   the functionality of document widgets added to the application, and we cover
   the functionality of document widgets added to the application, and we cover
   them in this section.
   them in this section.

+ 1 - 1
tutorial/labextensions.md

@@ -1,6 +1,6 @@
 # JupyterLab Extensions
 # JupyterLab Extensions
 
 
-A JupyterLab extension provides additional, optional functionality to JupyterLab's built-in capabilities. An extension is a module that provides one or more [plugins](plugins.html) to the JupyterLab application. To streamline third-party development of extensions, this library provides a build script for generating third party extension JavaScript bundles.
+A JupyterLab extension provides additional, optional functionality to JupyterLab's built-in capabilities. An extension is a module that provides one or more [plugins](plugins.md) to the JupyterLab application. To streamline third-party development of extensions, this library provides a build script for generating third party extension JavaScript bundles.
 
 
 For information on creating a lab extension, please see the documentation for
 For information on creating a lab extension, please see the documentation for
 the [@jupyterlab/extension-builder](https://github.com/jupyterlab/extension-builder).
 the [@jupyterlab/extension-builder](https://github.com/jupyterlab/extension-builder).