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

Switch all code blocks to use valid Code Hike languages #815

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

bskinn
Copy link
Contributor

@bskinn bskinn commented Nov 29, 2023

Code Hike code block docs

  • Code Hike does not differentiate between flavors of Python formatting. There is only python (or py)
  • C++ is cpp

Not sure why we're getting errors for c and rst, as both of those are declared as supported.

Perhaps we need to update Code Hike?

Copy link

vercel bot commented Nov 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
labs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 3:28pm

@bskinn
Copy link
Contributor Author

bskinn commented Nov 29, 2023

Separately, we may want to highlight the available Code Hike annotation features in the blog authoring docs.

Some handy capability in there.

Created as #825.

@bskinn
Copy link
Contributor Author

bskinn commented Nov 29, 2023

Updating Code Hike to 0.9.0 addresses the rst not valid language complaint, but
it's still complaining about C.

Note the capital C in the complaints -- may be important.

Is something transforming the ```c lines (lowercase c) in the Markdown source to ```C (uppercase C)?

For an example in code, see the Ruby-XND post

@gabalafou
Copy link
Contributor

Looking at those screenshots I added, jeez we really need to fix the color contrast of our syntax highlighter 🙈

@bskinn
Copy link
Contributor Author

bskinn commented Nov 29, 2023

From my local build:

info  - Collecting page data
[====] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[=== ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[==  ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[=   ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[    ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[=   ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[==  ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[=== ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[ ===] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[  ==] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.
[    ] info  - Generating static pages (4/104)[Code Hike warning] C is not a valid language, no syntax highlighting will be applied.

It looks like there's a page somewhere that defines a code block with capital-C language... but I can't for the life of me find it in the repo.

Mostly changing variations of `python` to `python` or `py`.
This addresses the `rst not valid language` complaint, but
it's still complaining about `C`.

The capital `C` may be important here -- is something transforming
the ```c lines to ```C?
@bskinn
Copy link
Contributor Author

bskinn commented Nov 30, 2023

Looking at those screenshots I added, jeez we really need to fix the color contrast of our syntax highlighter 🙈

@gabalafou Third-party theme, here's point of import.

Code Hike theme docs.

Created as #824.

@bskinn
Copy link
Contributor Author

bskinn commented Nov 30, 2023

I'm suspecting that the unexplained C is not a valid language is coming as a curious side effect of #822.

Thus, I'm reasonably confident that this issue has been fixed for all code blocks actually showing code on the site, and the PR is ready for review. Attn @gabalafou.

Copy link
Contributor

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@bskinn bskinn merged commit 6c533bc into develop Dec 1, 2023
3 checks passed
@bskinn bskinn deleted the fix-codehike-languages branch December 1, 2023 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GitHub :octocat: labs 🔭 Items related to the Labs website needs: review 👀 owner: Quansight For Quansight work, regardless of timing/priority type: content 📝
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants