Repository: bokeh/bokeh

Issue:
[BUG] Roadmap link on docs page links to a nonexistent page
#### ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

#### Description of expected behavior and the observed behavior
https://bokeh.pydata.org/en/latest/index.html
In the footer, the 'Roadmap' link leads to
'https://bokeh.pydata.org/en/latest/docs/https://bokeh.org/roadmap.html',
which does not exist.

Expected behavior: Display the Roadmap page.
Observed behavior: 404 error.

Now, the obvious issue here is the wrong URL, but https://bokeh.org/roadmap.html produces 404 as well.



Discussion:
In fact all links in "About us" section are broken and 404 page is broken (missing or bad CSS?) as well.
The roadmap is on the main project page now:

https://bokeh.org/roadmap/


You can actually see that embedded in the middle of the broken link above:

`https://bokeh.pydata.org/en/latest/docs/***https://bokeh.org/roadmap.html***`

I updated all these links when the main front page was stood up, to point there for static content that should not be built in the docs anymore, but the links are not getting rendered properly. We should definitely fix before 1.4 but it's doubtful I would try to fix the 1.3.1 docs already deployed. 

Resolving patch:
diff --git a/_setup_support.py b/_setup_support.py
--- a/_setup_support.py
+++ b/_setup_support.py
@@ -239,20 +239,6 @@ def get_version():
     '''
     return versioneer.get_version()
 
-def upgrade_npm():
-    # Workaround to upgrade ``npm`` since Read the Docs build environment have
-    # ``3.5.2`` and we need at least ``npm>=6.0``
-    os.system('cd ~ ; mkdir bin ; npm install npm')
-    os.environ['PATH'] = '/home/docs/node_modules/.bin/:{}'.format(os.environ.get('PATH'))
-    print('PATH: {}'.format(os.environ.get('PATH')))
-
-def set_env_to_build_bokehjs():
-    # TODO: this can be defined using Environment Variables on Read the Docs
-    # https://docs.readthedocs.io/en/latest/guides/environment-variables.html
-
-    # Tell Bokeh install script to always build the Javascript files
-    os.environ['BOKEH_BUILD_JS'] = '1'
-
 # -----------------------------------------------------------------------------
 # Helpers for operation in the bokehjs dir
 # -----------------------------------------------------------------------------
@@ -266,8 +252,7 @@ def jsbuild_prompt():
     '''
     print(BOKEHJS_BUILD_PROMPT)
     mapping = {"1": True, "2": False}
-    # Use an environment variable to avoid prompting to the user
-    value = os.environ.get("BOKEH_BUILD_JS", "2") or input("Choice? ")
+    value = input("Choice? ")
     while value not in mapping:
         print("Input '%s' not understood. Valid choices: 1, 2\n" % value)
         value = input("Choice? ")
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,6 @@
 '''
 from os.path import join
 from shutil import copy
-import os
 import sys
 
 from setuptools import find_packages, setup
@@ -73,11 +72,6 @@
     show_help
 )
 
-if os.environ.get('READTHEDOCS') == 'True':
-    from _setup_support import upgrade_npm, set_env_to_build_bokehjs
-    upgrade_npm()
-    set_env_to_build_bokehjs()
-
 # immediately bail for ancient pythons
 if sys.version_info[:2] < (2, 7):
     raise RuntimeError("Bokeh requires python >= 2.7")
diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py
--- a/sphinx/source/conf.py
+++ b/sphinx/source/conf.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
+from os.path import abspath, dirname, join
 
 #
 # Bokeh documentation build configuration file, created by
@@ -67,7 +68,7 @@
 
 # General information about the project.
 project = 'Bokeh'
-copyright = '© Copyright 2015-2019, Anaconda and Bokeh Contributors.'
+copyright = '© Copyright 2015-2018, Anaconda and Bokeh Contributors.'
 
 # Get the standard computed Bokeh version string to use for |version|
 # and |release|
@@ -85,6 +86,10 @@
 if settings.docs_version():
     version = release = settings.docs_version()
 
+# get all the versions that will appear in the version dropdown
+f = open(join(dirname(abspath(__file__)), "all_versions.txt"))
+all_versions = [x.strip() for x in reversed(f.readlines())]
+
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
@@ -165,27 +170,27 @@
         ('Github', '//github.com/bokeh/bokeh'),
     ),
     'ABOUT': (
-        ('Roadmap', 'https://bokeh.org/roadmap'),
-        ('Team',            'https://bokeh.org/team'),
-        ('Citation',        'https://bokeh.org/citation'),
-        ('Contact',         'https://bokeh.org'),
+        ('Roadmap',         '//bokeh.org/roadmap'),
+        ('Team',            '//bokeh.org/team'),
+        ('Citation',        '//bokeh.org/citation'),
+        ('Contact',         '//bokeh.org'),
     ),
     'SOCIAL': (
         ('Contribute', 'contribute'),
-        ('Discourse', 'https://discourse.bokeh.org'),
+        ('Discourse', '//discourse.bokeh.org'),
         ('Github', '//github.com/bokeh/bokeh'),
         ('Twitter', '//twitter.com/BokehPlots'),
     ),
     'NAV_DOCS': (
-        ('Installation', 'docs/installation'),
-        ('User Guide', 'docs/user_guide'),
-        ('Gallery', 'docs/gallery'),
+        ('Installation', 'installation'),
+        ('User Guide', 'user_guide'),
+        ('Gallery', 'gallery'),
         ('Tutorial', 'https://mybinder.org/v2/gh/bokeh/bokeh-notebooks/master?filepath=tutorial%2F00%20-%20Introduction%20and%20Setup.ipynb'),
-        ('Reference', 'docs/reference'),
-        ('Releases', 'docs/releases'),
-        ('Developer Guide', 'docs/dev_guide'),
-        ('Search', 'search'),
+        ('Reference', 'reference'),
+        ('Releases', 'releases'),
+        ('Developer Guide', 'dev_guide'),
     ),
+    'ALL_VERSIONS': all_versions,
 }
 
 # If true, links to the reST sources are added to the pages.
@@ -271,77 +276,3 @@
     'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),
     'numpy': ('https://docs.scipy.org/doc/numpy/', None)
 }
-
-
-import os
-import subprocess
-
-# Do not use Bokeh CDNs to serve JS files when building latest version
-# of docs (and/or unreleased versions). We want to serve the compiled
-# JS files from Read the Docs servers itself to match the
-# documentation with the JS version. Although, when using a tagged
-# release, we want to use Bokeh CDN.
-def _get_current_commit():
-    result = subprocess.run(
-        ['git', 'rev-parse', '--verify', 'HEAD'],
-        stdout=subprocess.PIPE,
-    )
-    return result.stdout.decode('utf8').strip()
-
-def git_tagged_version():
-    commit = _get_current_commit()
-    print('Bokeh commit: {commit}'.format(commit=commit))
-    result = subprocess.run(
-        ['git', 'tag', '--points-at', commit],
-        stdout=subprocess.PIPE,
-    )
-    tagged = result.stdout.decode('utf8').strip()
-    print('Bokeh tagged version: {tagged}'.format(tagged=tagged))
-    return tagged
-
-if os.environ.get('READTHEDOCS') == 'True':
-    readthedocs_version = os.environ.get('READTHEDOCS_VERSION')
-    tagged_version = git_tagged_version()
-    if tagged_version:
-        # Use Bokeh Resources from CDN
-        os.environ['BOKEH_DOCS_CDN'] = tagged_version
-    else:
-        # Use Bokeh Resources from Read the Docs
-        os.environ['BOKEH_DOCS_CDN'] = 'test:{readthedocs_version}'.format(
-            readthedocs_version=readthedocs_version,
-        )
-
-    bokeh_docs_cdn = os.environ.get('BOKEH_DOCS_CDN')
-    print('BOKEH_DOCS_CDN: {bokeh_docs_cdn}'.format(
-        bokeh_docs_cdn=bokeh_docs_cdn,
-    ))
-
-    # Set the proper ``BOKEH_DOCS_VERSION`` based on the version being
-    # built on Read the Docs
-    os.environ['BOKEH_DOCS_VERSION'] = readthedocs_version
-    print('BOKEH_DOCS_VERSION: {readthedocs_version}'.format(
-        readthedocs_version=readthedocs_version,
-    ))
-
-    build_js = os.environ.get('BOKEH_BUILD_JS')
-    print('BOKEH_BUILD_JS: {build_js}'.format(build_js=build_js))
-
-    # Download all the sample data to plot
-    import bokeh
-    bokeh.sampledata.download(progress=False)
-
-    # Create the proper structure to serve CSS and JS files compiled by
-    # Bokeh. We can't use ``html_static_path`` here because the URLs are
-    # hardcoded to ``static/js`` instead of ``_static/js``, etc
-    os.system('mkdir -p bokehJSbuildstatic')
-    os.system('cd bokehJSbuildstatic; ln -s ../../../bokehjs/build static')
-
-    html_extra_path = [
-        'bokehJSbuildstatic',
-    ]
-
-    # Ignore Google API key
-    bokeh_missing_google_api_key_ok=True
-
-    # To deal with ``/scripts/`` URLs
-    bokeh_plot_use_relative_paths = True


Test patch: