diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:58:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:59:09 +0300 |
| commit | c234f221f9be698bc0501c60459e1ae8e67df6c3 (patch) | |
| tree | 944b4dec10fada8d93456dc5a85e6bfdb36a8b8b /scripts/test_preview.py | |
| parent | ef85fa0c7ebb48bb59fe7593af5a67f3e02ff3d4 (diff) | |
feat(docs): publish versioned release documentation
Diffstat (limited to 'scripts/test_preview.py')
| -rw-r--r-- | scripts/test_preview.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/scripts/test_preview.py b/scripts/test_preview.py index 87bd52eb..e11af67c 100644 --- a/scripts/test_preview.py +++ b/scripts/test_preview.py @@ -156,7 +156,35 @@ file: ../../../public/assets/logo.svg self.assertIn("file: ../../../../public/assets/logo.svg", output) self.assertIn("from '../../../components/ConfigReference.astro'", output) self.assertIn("from '../../../../components/LocaleWidget.astro'", output) - self.assertIn("Preview docs describe unreleased preview builds", output) + self.assertIn("Next docs describe unreleased work", output) + self.assertIn("edit/master/docs/next/website/src/content/docs/", output) + + def test_version_docs_rewrite_links_and_source_paths(self): + source = """--- +title: Install Herdr +--- + +import ConfigReference from '../../components/ConfigReference.astro'; + +[Install](/docs/install/) +[Skill](https://github.com/ogulcancelik/herdr/blob/master/SKILL.md) +file: ../../../public/assets/logo.svg +""" + output = subprocess.check_output( + [ + "node", + "website/scripts/prepare-docs.mjs", + "--rewrite-version-doc-fixture", + "0.7.4", + ], + input=source, + text=True, + ) + self.assertIn("[Install](/docs/0.7.4/install/)", output) + self.assertIn("file: ../../../../../public/assets/logo.svg", output) + self.assertIn("from '../../../../components/ConfigReference.astro'", output) + self.assertIn("blob/v0.7.4/docs/next/website/src/content/docs/index.mdx", output) + self.assertIn("blob/v0.7.4/SKILL.md", output) class ConventionalCommitTests(unittest.TestCase): |
