|
45 | 45 | ] |
46 | 46 |
|
47 | 47 | redirects = { |
48 | | - "tools/index": "../resources/tools/index.html", |
49 | | - "publications/index": "../resources/publications/index.html", |
50 | | - "data/index": "../resources/data/index.html", |
51 | | - "about/index": "../index.html" |
| 48 | + "tools/index": "../resources/tools/index.html", |
| 49 | + "publications/index": "../resources/publications/index.html", |
| 50 | + "data/index": "../resources/data/index.html", |
| 51 | + "about/index": "../index.html", |
| 52 | + "0.1/index": "../specifications/0.1/index.html", |
| 53 | + "0.1/": "../specifications/0.1/index.html", |
| 54 | + "0.2/index": "../specifications/0.2/index.html", |
| 55 | + "0.2/": "../specifications/0.2/index.html", |
| 56 | + "0.3/index": "../specifications/0.3/index.html", |
| 57 | + "0.3/": "../specifications/0.3/index.html", |
| 58 | + "0.4/index": "../specifications/0.4/index.html", |
| 59 | + "0.4/": "../specifications/0.4/index.html", |
| 60 | + "0.5/index": "../specifications/0.5/index.html", |
| 61 | + "0.5/": "../specifications/0.5/index.html", |
| 62 | + "Dev/index": "../specifications/Dev/index.html", |
| 63 | + "Dev/": "../specifications/Dev/index.html" |
52 | 64 | } |
53 | 65 |
|
54 | 66 | # -- Options for HTML output ------------------------------------------------- |
@@ -119,23 +131,6 @@ def build_served_html(): |
119 | 131 | if os.path.exists(bikeshed_output): |
120 | 132 | shutil.copy2(bikeshed_output, f'_html_extra/{version}/index.html') |
121 | 133 | print(f'✅ Found legacy bikeshed, serving as extra html for {version}') |
122 | | - else: |
123 | | - myst_dir = os.path.dirname(myst_file) |
124 | | - cmd = [sys.executable, '-m', 'jupyter_book', 'build', '--ci', '--html'] |
125 | | - proc = subprocess.run(cmd, cwd=myst_dir, capture_output=True, text=True) |
126 | | - print(f"Running: {' '.join(cmd)} in {myst_dir}") |
127 | | - if proc.stdout: |
128 | | - print(proc.stdout) |
129 | | - if proc.stderr: |
130 | | - print(proc.stderr) |
131 | | - proc.check_returncode() |
132 | | - print('✅ Built jupyter-book documentation for version', version) |
133 | | - |
134 | | - build_dirs = glob.glob(f'specifications/{version}/**/_build/html', recursive=True) |
135 | | - if not build_dirs: |
136 | | - raise FileNotFoundError(f'No build directory found for version {version}') |
137 | | - shutil.copytree(build_dirs[0], f'_html_extra/{version}', dirs_exist_ok=True) |
138 | | - print(f'✅ Copied jupyter-book documentation as extra html for {version}') |
139 | 134 | except Exception as e: |
140 | 135 | print(f'⚠️ Could not copy served html for version {version}: {e}') |
141 | 136 |
|
|
0 commit comments