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

Generate link to the source file after code snippet #107

Open
Tomas2D opened this issue Oct 5, 2024 · 1 comment
Open

Generate link to the source file after code snippet #107

Tomas2D opened this issue Oct 5, 2024 · 1 comment

Comments

@Tomas2D
Copy link

Tomas2D commented Oct 5, 2024

We are using your library to embed code examples in our documentation (pure Markdown files).
We would like to include a link to the source file so a user can open it.

Input:

Hello world!

<!-- embedme examples/a.ts -->

```ts
```

Output:

Hello world!

```ts
const foo = "bar"
```

Source: [examples/a.ts](./examples/a.ts)
@zakhenry
Copy link
Owner

zakhenry commented Oct 6, 2024

This would need to be a bit more complex than this because we'd likely need to have a base url passed as relative links on the generated site might not line up with the source code

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

No branches or pull requests

2 participants