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

Implement Shared Language Context and Enhanced Code Examples #827

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

lningthou
Copy link

PR: Implement Shared Language Context and Enhanced Code Examples

New Components and Features

1. LanguageContext

  • Implements a shared context for language selection
  • Ensures consistent language choices across the entire application

2. UniversalTabs Component

  • Builds upon Nextra's Tabs Component
  • Utilizes the shared LanguageContext for mirrored language selections across all instances

3. CodeCell Component

  • Serves as an enhanced alternative to standard markdown codeblocks
  • Renders codeblocks scraped from GitHub examples during buildtime

Codeblocks Scraper Script

Functionality

  • Automates the process of updating code examples
  • Scrapes codeblocks from specified GitHub repositories during buildtime via pnpm run build
  • Links to scrape can be configured within the script

Note: This script requires authentication to avoid GitHub API rate limiting.

  • Uses Octokit for GitHub API interaction
  • Expects process.env.GITHUB_TOKEN to be set
  • The token should have repository read access

Copy link

vercel bot commented Aug 27, 2024

@lningthou is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Sep 11, 2024

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

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 8:51pm

@grutt
Copy link
Contributor

grutt commented Sep 11, 2024

I'm assuming this depends on #824 and related PRs? I'm missing all the examples in the docs on vercel preview

Copy link
Contributor

@grutt grutt left a comment

Choose a reason for hiding this comment

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

I still need to go through examples page by page, leaving this un approved for now.

worker.register_workflow(workflow)
worker.start()
```
<CodeCell language="Python" blockName="registering_workflows_starting_workers"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd want to keep existing code as a fallback or override

@@ -118,6 +118,12 @@ html.dark .nextra-code-block pre {
background-color: #1e293b !important;
}

.shiki {
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this?

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.

3 participants