Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for writing conditional documentation on the docs site #7951

Merged
merged 6 commits into from
Sep 26, 2022

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Sep 26, 2022

This will allow us to remove the website_live branch while still allowing us to document new features that will only be available in the next release. The conditionals are removed when doing a release. I was planning on removing them by transforming Markdoc's AST but Markdoc's formatter is experimental and seems to break on some of our content so this uses a regex. I was also planning to add conditionals around documentation on unreleased features but it seems as though there isn't any.

New

{% if $nextRelease %}
You can filter a post using `post (...)`
{% /if %}

Updates

{% if $nextRelease %}
You can filter a post using `post (...)`
{% else /%}
You cannot filter posts.
{% /if %}

Removals

{% if $nextRelease %}
{% else /%}
You cannot filter posts.
{% /if %}

@vercel
Copy link

vercel bot commented Sep 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Sep 26, 2022 at 5:51AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Sep 26, 2022

⚠️ No Changeset found

Latest commit: 3234f48

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 26, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3234f48:

Sandbox Source
@keystone-6/sandbox Configuration

@vercel vercel bot temporarily deployed to Preview September 26, 2022 04:05 Inactive
@emmatown emmatown force-pushed the markdoc-next-release-condition branch from 8022610 to 994cada Compare September 26, 2022 04:06
@vercel vercel bot temporarily deployed to Preview September 26, 2022 04:08 Inactive
@vercel vercel bot temporarily deployed to Preview September 26, 2022 04:11 Inactive
@vercel vercel bot temporarily deployed to Preview September 26, 2022 04:21 Inactive
@emmatown emmatown marked this pull request as ready for review September 26, 2022 04:31
@emmatown emmatown requested a review from a team September 26, 2022 04:31
@dcousens dcousens enabled auto-merge (squash) September 26, 2022 05:51
@vercel vercel bot temporarily deployed to Preview September 26, 2022 05:51 Inactive
@dcousens dcousens merged commit 52da098 into main Sep 26, 2022
@dcousens dcousens deleted the markdoc-next-release-condition branch September 26, 2022 06:00
@dcousens dcousens mentioned this pull request Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants