Prechádzať zdrojové kódy

Merge pull request #1747 from blink1073/check-links

Check links on CI
Afshin Darian 8 rokov pred
rodič
commit
2caccfd070

+ 4 - 0
scripts/travis_script.sh

@@ -38,6 +38,10 @@ if [[ $GROUP == coverage_and_docs ]]; then
     # Run the coverage check.
     npm run test:coverage
 
+    # Run the link check
+    pip install -q pytest-check-links
+    py.test --check-links -k .md .
+
     # Build the docs
     npm run 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`.
 - 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 
-files (see [Documents](documents.html)).
+files (see [Documents](documents.md)).
 - The `plugin.ts` file should create the extension and add the content
 to the application.  In this case registering the widget factory using
 the document registry.

+ 10 - 0
tutorial/conf.py

@@ -23,6 +23,7 @@ import shlex
 
 # For conversion from markdown to html
 import recommonmark.parser
+from recommonmark.transform import AutoStructify
 
 # Set paths
 #sys.path.insert(0, os.path.abspath('.'))
@@ -325,6 +326,7 @@ texinfo_documents = [
      'Miscellaneous'),
 ]
 
+
 # Documents to append as an appendix to all manuals.
 #
 # texinfo_appendices = []
@@ -352,3 +354,11 @@ if not on_rtd:
     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # 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
   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
   the functionality of document widgets added to the application, and we cover
   them in this section.

+ 1 - 1
tutorial/labextensions.md

@@ -1,6 +1,6 @@
 # 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
 the [@jupyterlab/extension-builder](https://github.com/jupyterlab/extension-builder).