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

Code Block Component #310

Open
elijah-potter opened this issue Jan 10, 2025 · 4 comments
Open

Code Block Component #310

elijah-potter opened this issue Jan 10, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@elijah-potter
Copy link
Contributor

Describe the problem

I'd like to be able to auto generate certain bits of reference code.

Describe the proposed solution

I would like to see a component that allows us to just throw down a <CodeBlock source={my_code} lang={my_codes_language} /> in my own Svelte components.

Alternatives considered

I've tried just writing out a Markdown block and using {} syntax to put in my autogenerated reference code, but it doesn't do the replacement.

Importance

would make my life easier

@elijah-potter elijah-potter added the enhancement New feature or request label Jan 10, 2025
@Blackman99
Copy link
Member

Sorry for the long wait.

The core feature of sveltepress is content-centered static site generator. This means runtime code highlight feature is a little bit deviate from the main point.

However the component you requested can still be implemented in the theme package.

@elijah-potter
Copy link
Contributor Author

Sorry for the long wait.

No worries!

However the component you requested can still be implemented in the theme package.

Anything I can do to get the ball rolling on it?

@Blackman99
Copy link
Member

The default theme package can hold a component like that.
I'll be working on that. But currently there's no timely guarantee for that

And PRs are welcomed.

@elijah-potter
Copy link
Contributor Author

Thank you so much! There's no rush at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants