Skip to content

Support Markdown/Notebook-Friendly Documentation Export for Downstream Integration(convert rat files to md files and save)#18278

Merged
zhaochenyang20 merged 6 commits intosgl-project:mainfrom
klhhhhh:kl_dev
Feb 5, 2026
Merged

Support Markdown/Notebook-Friendly Documentation Export for Downstream Integration(convert rat files to md files and save)#18278
zhaochenyang20 merged 6 commits intosgl-project:mainfrom
klhhhhh:kl_dev

Conversation

@klhhhhh
Copy link
Contributor

@klhhhhh klhhhhh commented Feb 5, 2026

Motivation

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

Review Process

  1. Ping Merge Oncalls to start the PR flow. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • /tag-run-ci-label, /rerun-failed-ci, /tag-and-rerun-ci
  4. After green CI and required approvals, ask Merge Oncalls to merge.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 5, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @klhhhhh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the documentation export process by modifying the markdown target in the docs/Makefile. The primary goal is to improve compatibility for downstream integration by ensuring all relevant documentation files, including root-level .md and .rst files, are included in the export, and by automatically converting .rst files into a more widely compatible GitHub Flavored Markdown format.

Highlights

  • Enhanced Documentation Export Scope: The markdown target in docs/Makefile now includes root-level .md and .rst files in the export process, removing the previous mindepth 2 restriction to ensure all relevant documentation is captured.
  • RST to Markdown Conversion: Added functionality to automatically convert .rst (reStructuredText) files to GitHub Flavored Markdown (.md) using pandoc during the documentation export, improving compatibility for downstream integration.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/Makefile
    • Updated the markdown target to remove the mindepth 2 restriction, allowing .md and .rst files from the root directory to be included in the export.
    • Integrated pandoc to convert .rst files to GitHub Flavored Markdown (.md) as part of the documentation export workflow.
    • Revised comments within the markdown target to accurately reflect the updated logic for file copying and conversion.
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the documentation export process by converting .rst files to Markdown. The changes in the Makefile are a good step forward. My review includes a suggestion to refine the file handling logic to prevent creating redundant files in the output, which will make the export cleaner. Overall, a useful addition.

Comment on lines 54 to +59
cp -f "$$SRC" "$$OUT_DIR/"; \
case "$$SRC" in \
*.rst) \
BASE=$$(basename "$$SRC" .rst); \
pandoc -f rst -t gfm "$$SRC" -o "$$OUT_DIR/$$BASE.md" ;; \
esac \
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The current implementation first copies all source files, including .rst files, and then converts .rst files to Markdown. This results in both the original foo.rst and the converted foo.md in the output directory, which is redundant. The logic should be adjusted to only convert .rst files and copy other files (like .md) without creating duplicates.

		case "$$SRC" in \
		  *.rst) \
			BASE=$$(basename "$$SRC" .rst); \
			pandoc -f rst -t gfm "$$SRC" -o "$$OUT_DIR/$$BASE.md" ;; \
		  *) \
			cp -f "$$SRC" "$$OUT_DIR/" ;; \
		esac \

@zhaochenyang20 zhaochenyang20 merged commit e616d35 into sgl-project:main Feb 5, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants