evilz / vscode-reveal

Revealjs vsCode extension
https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal
MIT License
452 stars 146 forks source link

Use custom theme from a super folder #1211

Open signedav opened 1 year ago

signedav commented 1 year ago

When I have multiple directories with presentations:

── static_assets
│   └── theme
│       ├── base-theme.css
│       ├── base-white-theme.css
│       ├── logo_white.png
│       ├── pitch-theme.css
│       ├── softteaching-theme.css
│       └── teaching-theme.css
├── talk_presentation
│   └── slides
│       ├── assets
│       │   └──cloud.png
│       └── mypresentation.md
└── teaching_workshop
    └── slides
        ├── assets
        │   ├── baskets_datasets_baskets.png
        │   └── title.png
        └── workshop_de.md

And I reference the custom theme in the md files:

---
title: Workshop
theme: theme/softteaching-theme.css
customTheme: ../../theme/softteaching-theme
---

In the CI I can map my static_assets/theme folder to the teaching_workshop/slides/_assets/theme folder. No problem here with the value of theme.

But in the VS Code Plugin, it seems to not work to reference to relative paths that point outside the slides folder at customTheme.

Is there any trick for this. Or could this be an enhancement of this plugin?

evilz commented 1 year ago

I see. Actually it's not working cause the webserver is started from the markdown file. And then parents folder are not available.

The chance for this can be tricky and not really simple.

ganeshgore commented 1 year ago

you can make relative symbolic link of static_assets is each presentation directory, that will work.