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

doc/user: convert all user docs to use mzsql highlighting where appropriate #27805

Merged
merged 17 commits into from
Jun 24, 2024

Conversation

arusahni
Copy link
Contributor

Motivation

  • This PR adds a feature that has not yet been specified.

Syntax highlighting in our docs uses a general SQL highlighter. This is fine, but we don't have highlighting on Mz-specific keywords, which is suboptimal. I have upstreamed Materialize SQL dialect highlighting to Chroma, the highlighting library used by Hugo. We upgraded to a compatible version of Hugo in #27679 , so now we just need to apply the new syntax highlighting to all examples of Materialize SQL dialect in the docs. I took care to not update SQL Server, MySQL, and Postgres examples.

Before

Without Mz syntax highlighting

After

With Mz syntax highlighting

If we're happy with this, and once it's merged, I'll work on formalizing the Chroma dialect update motion as a script so we can upstream new keywords as they land.

Tips for reviewer

Sorry for the large diff! I grouped sections of the docs by commit, so that may ease review. Please let me know if you'd prefer I submit this another way.

Checklist

Also fix a bug where PostgreSQL shortcodes were being used.
@arusahni arusahni requested a review from morsapaes as a code owner June 21, 2024 19:27
Copy link
Contributor

@morsapaes morsapaes left a comment

Choose a reason for hiding this comment

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

Thank you so much for this, @arusahni! ❤️ Also for correctly highlighting the PostgreSQL- and MySQL-specific bits.

@arusahni arusahni merged commit 40cb516 into MaterializeInc:main Jun 24, 2024
12 checks passed
@arusahni arusahni deleted the docs/mzsql-highlighting branch June 24, 2024 15:25
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.

None yet

2 participants