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

Markdown include not showing sometimes #1247

Closed
3 tasks done
HipyCas opened this issue Aug 28, 2022 · 3 comments
Closed
3 tasks done

Markdown include not showing sometimes #1247

HipyCas opened this issue Aug 28, 2022 · 3 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@HipyCas
Copy link

HipyCas commented Aug 28, 2022

Describe the bug

This is a pretty funny one. I was using a Markdown Include as described in your docs. I already had used one earlier in the file and worked perfectly, but strange enough, this didn't show up. This was the part that was failing:

<!--@include: ../shared/servicios/recordatorios-nginx.md -->

## Integración con Authentik

The fact that it is followed by a header is pretty important

wrong

And that's what showed up, just not the Markdown that should be included. To check if the path or something was wrong, I copied the earlier one that was working just below this one, like this:

<!--@include: ../shared/servicios/recordatorios-nginx.md -->
<!--@include: ../shared/servicios/puertos.md -->

## Integración con Authentik

ok_include

And funny enough, it worked. Note that again, I have the header below too. So I went to remove the test purpose second include and, surprise! The Markdown that should be included disappeared again (as in the first picture). By pure chance, I uncommented the line and saw it worked, so I tried to just write some random text below the _include, to be precise this random text:

<!--@include: ../shared/servicios/recordatorios-nginx.md -->

nice

## Integración con Authentik

ok_below

And it showed up again! Things are getting pretty odd at this point, so I went a bit further and tested to put the test text below the header, like this:

<!--@include: ../shared/servicios/recordatorios-nginx.md -->

## Integración con Authentik

nice

ok_title

It worked! At this point I'm pretty freaked out so I try one last thing, putting the included Markdown at the end of the file, and it works again!

ok_end

So, I ended up concluding that Markdown include does not work directly above a heading for some reason I cannot include.

But hey, it doesn't end here. The Markdown file that was being included was like the following:

::: tip A nice title

Just some pretty nice text

:::

But, if I add a text line or a header below, it doesn't show up. For example, this wouldn't show up:

::: tip A nice title

Just some pretty nice text

:::

nice paragraph

## Nice heading

And well, placing the text above the tip block doesn't fix it either, or even removing the tip block and putting just text.

There's a chance it really is just me not knowing how to use the Markdown Include, if so I'm really sorry for the noise.

Reproduction

I included examples above, but anywhay:

  1. Create a Markdown file with a custom container
  2. Include it in other and write a header below
  3. See how it doesn't work and put text below or remove the header
  4. See how now it works and add text in the included Markdown file above or below the container
  5. See how the text doesn't show up

Expected behavior

Well, just show up correcetly I guess

System Info

System:
    OS: Linux 5.19 Pop!_OS 22.04 LTS
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 7.22 GB / 15.48 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
  Browsers:
    Brave Browser: 104.1.42.97
    Chromium: 104.0.5112.101
    Firefox: 103.0
  npmPackages:
    vitepress: ^1.0.0-alpha.12 => 1.0.0-alpha.12

Additional context

BTW I tested on Brave

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@HipyCas HipyCas added the bug: pending triage Maybe a bug, waiting for confirmation label Aug 28, 2022
@HipyCas
Copy link
Author

HipyCas commented Aug 29, 2022

I've been doing some more testing, and I believe it must be a problem with the dev server. The server seems not to be picking up the changes of the included Markdown files, not even on page reload. If I restart the server, all the problems I mention above dissapear.

@brc-dd
Copy link
Member

brc-dd commented Aug 29, 2022

HMR doesn't work RN with included markdown. #117 (comment)

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2022
@HipyCas
Copy link
Author

HipyCas commented Aug 31, 2022

Thanks for the quick response!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants