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

✨ Add startLine, endLine Support for codeimporter #1558

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

jason810496
Copy link
Contributor

@jason810496 jason810496 commented Jun 21, 2024

Feat: Adding startLine, endLine support for codeimporter shortcodes

  • I'm writing a blog that needs to import code from GitHub, but only a specific range of code.
    • The current codeimporter shortcodes don't provide this feature.
  • If startLine and endLine are not provided, the whole code will be imported .
  • Updated the docs and provided examples as well (have run npm run example, works nicely).

Working example on my blog:

{{< codeimporter url="https://raw.githubusercontent.com/redis/redis/811c5d7aeb0b76494d78efe61e418f574c310ec0/src/rdb.c" type="c" startLine="3907" endLine="3942">}}

Working example on my blog

Big thanks for sharing this theme 💯
I'm enjoying the i18n support and wonderful UX. I will promote it to my friends 🙌

@jason810496
Copy link
Contributor Author

Thanks for the reminder! @mnjm
I have fixed the URL encoding issue mentioned.

@jason810496 jason810496 requested a review from mnjm June 22, 2024 18:42
@nunocoracao nunocoracao changed the base branch from main to dev June 27, 2024 21:02
@nunocoracao nunocoracao merged commit 84dc447 into nunocoracao:dev Jun 27, 2024
2 checks passed
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