!include file works only with full path in Markdown

See original GitHub issue

Hi there, I’ve spent almost a day to resolve this issue… but didn’t find correct answer.

So, what I have. I’ve create a file with my styles that I want to apply at all of my diagrams. So I’m expecting to have something like this:

@startuml
!include PlantUMLConfig.txt
@enduml

It’s perfectly works on preview but when I switch to my markdown file where I wanna see my diagrams it shows me an error that cannot include PlantUMLConfig.txt

when I change

!include PlantUMLConfig.txt -> !include fullPath/PlantUMLConfig.txt

everything works fine

I was trying to add folder path at

"plantuml.includepaths" also "plantuml.commandArgs": ["-I/fullpath"] "plantuml.includes": ["fullPath"]

But nothing works for me …

So my question is: Where and how I should put path to my config file?

Regards, Max

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
qjebbscommented, Feb 4, 2021

Just made a small improvement, you will be able to add & apply includepaths in global settings for your case with next release:

   "plantuml.includepaths": [
        "/absolute/path/to/global_includes"
    ]

workspace setting is not an option because we don’t know where the diagram come from in markdown.

1reaction
qjebbscommented, Feb 4, 2021

Oh, I see. Basically it’s a technical limitation:

  • The extension contributes a plugin to VSCode markdown engine
  • The engine doesn’t tell the plugin any information about where the diagram is located
  • So the plugin doesn’t know where to resolve relative paths

You have find the solution, use absolute paths instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to automatically include filepath in R Markdown document
but what I really want to do is automatically include the file name as well as the path to the folder. There is...
Read more >
16.6 The working directory for R code chunks | R Markdown ...
This means when you refer to external files with relative paths in code chunks, you need to know that these paths are relative...
Read more >
Markdown editing with Visual Studio Code
Working with Markdown files in Visual Studio Code is simple, straightforward, ... Start the path with # to see completions for all the...
Read more >
13 File paths | R for Epidemiology
In this part of the book, we will need to work with file paths. File paths are nothing more than directions that tell...
Read more >
Configuring Site Relative Base Paths - Markdown Monster
By default, when MM renders topics it assumes the document's path as the base path for the document and so it really only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found