Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 8, 2025

Document parameterized markdown snippets feature

Summary

Added documentation for parameterized markdown snippets, which allow snippets to accept arbitrary parameters as variables. The documentation was added as Step 4 to the existing reusable snippets page, maintaining consistency with the existing tutorial structure and plant-themed examples.

Changes:

  • Added Step 4 "Parameterized snippets" to reusable-markdown.mdx with examples showing single and multiple parameter usage
  • Created two example snippet files (watering-schedule.mdx, plant-care.mdx) used in the live Preview tab
  • Added changelog entry for 2025-11-08 with plant-themed example

Review & Testing Checklist for Human

  • Verify parameterized snippets actually work - Test that <Markdown src="/snippets/watering-schedule.mdx" plant="peace lily" interval="3" /> renders "Water your peace lily every 3 days" (not literal {plant} text). This is the core functionality being documented.
  • Test the Preview tab - Navigate to /learn/docs/writing-content/reusable-snippets in the preview and verify the Preview tab in Step 4 shows the correctly substituted text
  • Verify changelog anchor link - Click the link in the changelog entry and confirm it navigates to the parameterized snippets section

Test Plan

  1. Open the preview URL and navigate to the reusable snippets page
  2. Scroll to Step 4 "Parameterized snippets"
  3. Click the "Preview" tab and verify the output shows "Water your peace lily every 3 days" (not {plant} or {interval})
  4. Try creating a test page with a parameterized snippet to verify the syntax works as documented
  5. Click the changelog link and verify it navigates to the correct section

Notes

  • Used plant-themed examples (peace lily, fern, watering schedules) to match the existing page style
  • The Preview tab includes a live embed that depends on the watering-schedule.mdx file and the parameterized snippet feature working correctly
  • Fixed Vale warnings by avoiding time-relative terms ("now" → "support")

Link to Devin run: https://app.devin.ai/sessions/933babf4471a4d7ca89763ad492ef797
Requested by: Catherine Deskur ([email protected])

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

<CodeBlock title='fern/snippets/common-warning.mdx'>
```mdx
<Warning>
This feature is in beta and may change in future releases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'future' that become outdated

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

@@ -0,0 +1,23 @@
## Parameterized markdown snippets

Reusable markdown snippets can now accept arbitrary parameters that can be used as variables in the snippet. This enables flexible, reusable content templates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated

@@ -0,0 +1,3 @@
<Warning>
This feature is in beta and may change in future releases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'future' that become outdated

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

@chdeskur chdeskur merged commit f1e8e61 into main Nov 8, 2025
2 checks passed
@chdeskur chdeskur deleted the devin/1762621931-parameterized-snippets branch November 8, 2025 20:21
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.

3 participants