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

[Feature] Make Jinja {% docs %} optional in markdown files #11378

Open
3 tasks done
matthieucan opened this issue Mar 8, 2025 · 0 comments
Open
3 tasks done

[Feature] Make Jinja {% docs %} optional in markdown files #11378

matthieucan opened this issue Mar 8, 2025 · 0 comments
Labels
enhancement New feature or request triage

Comments

@matthieucan
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Markdown documentation files often take the following form:

my_model.md

{% docs my_model %}
This is documentation
{% enddocs %}

This is redundant, given the file name convention: my_model.md naturally refers to the model my_model, just like my_model.sql does.

It would be neat to make the Jinja block {% docs %} optional:

my_model.md

This is documentation

This would be consistent with SQL files.

Additionally, {% docs %} is not properly rendered in IDEs, as Jinja is not expected by default in markdown files.

A suggestion to not break any backwards compatibility:

  • Not using {% docs %} is optional
  • Any markdown file my_model.md is made available for use as description: {{ doc('my_model') }} if and only if documentation for my_model is not defined elsewhere.

Describe alternatives you've considered

No response

Who will this benefit?

Everyone writing docs.

Are you interested in contributing this feature?

Yes

Anything else?

No response

@matthieucan matthieucan added enhancement New feature or request triage labels Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant