nirtamir2 / obsidian-slidev

Integrates slidev presentations into obsidian
MIT License
8 stars 1 forks source link

How do I get started? #1

Open Yinlin124 opened 1 year ago

Yinlin124 commented 1 year ago

I'm unable to install this Obsidian plugin either through community plugins or via BRAT. I'm really looking forward to using this plugin. Could you please guide me on how to get started?

nirtamir2 commented 1 year ago

Hi! Thank you for interest ❤️ This plugin is still a work in progress. I can notify you with detailed instructions when it will be ready :) BTW - there is a prerequisite of having node.js installed on your computer. Is this prerequisite work for you?

Yinlin124 commented 1 year ago

Hi! Thank you for interest ❤️ This plugin is still a work in progress. I can notify you with detailed instructions when it will be ready :) BTW - there is a prerequisite of having node.js installed on your computer. Is this prerequisite work for you?

Yes, I have got Node.js ready. I see the commands in the current README are for Mac. Does this plugin support Windows environment as well?

nirtamir2 commented 1 year ago

I haven't checked it on Windows. I configure it to run a command specific to my env to load node.js. We can also configure it to run on Windows (or I will supply a setting for the initial load script because somehow my node.js did not load natively in child_proccess).

Yinlin124 commented 1 year ago

I haven't checked it on Windows. I configure it to run a command specific to my env to load node.js. We can also configure it to run on Windows (or I will supply a setting for the initial load script because somehow my node.js did not load natively in child_proccess).

Well, I can't wait to experience this plugin, because slidev is usually edited markdown content in vscode, but that doesn't fit my workflow. I look forward to your development.

nirtamir2 commented 1 year ago

I update the readme with development instructions. You can now clone the repo, install deps and run the dev command. It will help me to get early feedback

Yinlin124 commented 1 year ago

image

I successfully compiled this project, the plugin seems pretty good so far, and the experience is better than vscode.

But, did you use this plugin by creating a new slidev project folder directly under the obsidian vault?

Because obsidian cannot open files outside the vault, this undoubtedly increases the complexity of the vault.

Yinlin124 commented 1 year ago

image

By the way, there are also some minor garbled text bugs,but it doesn't affect anything.

nirtamir2 commented 1 year ago

Hi @Yinlin124 I'm really happy to see your feedback!

https://github.com/nirtamir2/obsidian-slidev/issues/1#issuecomment-1675748081 Seems like it's working in windows too 🥳

https://github.com/nirtamir2/obsidian-slidev/issues/1#issuecomment-1675749399 - I believe this causes by the setting that does the source ~/.profile command. If you remove it - it should not error in windows (TODO: I should make the default empty when I detect windows os)

But, did you use this plugin by creating a new slidev project folder directly under the obsidian vault?

This is tricky. Currently - I add the template in the repo (this is why it did not work with BRAT or I haven't publish it to obsidian). I plan to add instructions for the users / make an action that will init slidev to a place configured in settings. I believe it should work. Meaning that the plugin will check for the template in the given location and prompt the user to create the template manually / with a button. WDYT?

Yinlin124 commented 1 year ago

This is tricky. Currently - I add the template in the repo (this is why it did not work with BRAT or I haven't publish it to obsidian). I plan to add instructions for the users / make an action that will init slidev to a place configured in settings. I believe it should work. Meaning that the plugin will check for the template in the given location and prompt the user to create the template manually / with a button. WDYT?

image

Hi! nirtamir2 I think this method is feasible.

In addition, I tried another approach which also seems to work - creating symbolic links( .symlink i donot how to translate) in the vault for markdown files edited for slidev projects in other folders also takes effect.

I hope this can give you some inspiration.

nirtamir2 commented 1 year ago

I just publish v0.0.6 with support for a custom slidev template. Let me know if it works for you

Yinlin124 commented 1 year ago

Hi! nirtamir2. It seem didnot work on Windows.

Bugs: The first time I opened the plugin without setting the slidev-template path, it said the path was already valid even though it didn't exist yet. There might be some issue with the path validation. image

After I properly configured the slidev-template path (I put it under ...obsidian\plugins\slidev\slidev-template, and node.js environment variable is set up on my computer)

It didnot work. image

And log is "child process exited with code 0 and signal null child process exited with code 0" or "empty"

image

I have absolutely no idea where the problem. Hope I can provide some help. Looking forward to your continued development.

nirtamir2 commented 1 year ago

Did you run npm install in the template directory? In order to check for valid path - I check if I can run slidev in this path. Is it installed globally?

Yinlin124 commented 1 year ago

The path detection was indeed a global installation issue. After I uninstalled globally, the path detection became valid.

Did you run npm install in the template directory?

I have already npm installed. When I start it myself using bash, the plugin works. But it does not work when launched through commands within Obsidian.

nirtamir2 commented 1 year ago

What happens if you run

cd <templatePath>
 npm run slidev <absolute-path-to-slide-file.md> -- --port 3030
Yinlin124 commented 1 year ago

image

When I start it myself using bash, the plugin works. But it does not work when launched through commands within Obsidian.