Skip to content

[do not merge. this is a test] feat: Add a tool for inlining code excerpts #12239

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

Closed
wants to merge 2 commits into from

Conversation

antfitch
Copy link
Contributor

This change adds a new tool that allows you to write code samples directly in markdown files. The tool will automatically extract the code, create a new file in the examples directory, and replace the code block with a <?code-excerpt?> tag.

This will make it easier to write and maintain documentation that includes code samples.

The new tool can be run with the following command:

dart tool/flutter_site/bin/flutter_site.dart inline-excerpts --file path/to/your/file.md

Description of what this PR is changing or adding, and why:

Issues fixed by this PR (if any):

PRs or commits this PR depends on (if any):

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

This change adds a new tool that allows you to write code samples directly in markdown files. The tool will automatically extract the code, create a new file in the `examples` directory, and replace the code block with a `<?code-excerpt?>` tag.

This will make it easier to write and maintain documentation that includes code samples.

The new tool can be run with the following command:

```
dart tool/flutter_site/bin/flutter_site.dart inline-excerpts --file path/to/your/file.md
```
@antfitch antfitch requested review from sfshaza2, parlough and a team as code owners July 24, 2025 17:34
@antfitch antfitch marked this pull request as draft July 24, 2025 17:34
@antfitch antfitch changed the title [do not merge this is a test] feat: Add a tool for inlining code excerpts [do not merge. this is a test] feat: Add a tool for inlining code excerpts Jul 24, 2025
@@ -0,0 +1,74 @@
# Gemini Workspace Configuration
Copy link
Contributor Author

@antfitch antfitch Jul 25, 2025

Choose a reason for hiding this comment

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

@parlough and @Sfshaza I'm not going to push the change to this file, but we really need to get something like this added soon. @parlough essentially, whenever someone use gemini to work with our site, this will give gemini rules to follow (like keep lines under 80 characters, etc) and a description of what tools are available for it to look at.

For community members who might read this, we probably need something similar for other models. If someone loves making these, it would be awesome to see what you create.

@antfitch antfitch closed this Aug 12, 2025
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.

1 participant