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

How do I get started? #1

Open
Yinlin124 opened this issue Aug 7, 2023 · 15 comments
Open

How do I get started? #1

Yinlin124 opened this issue Aug 7, 2023 · 15 comments

Comments

@Yinlin124
Copy link

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
Copy link
Owner

nirtamir2 commented Aug 8, 2023

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

image

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

@nirtamir2
Copy link
Owner

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

#1 (comment) Seems like it's working in windows too 🥳

#1 (comment) - 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
Copy link
Author

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
Copy link
Owner

nirtamir2 commented Aug 13, 2023

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

@Yinlin124
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

What happens if you run

cd <templatePath>
 npm run slidev <absolute-path-to-slide-file.md> -- --port 3030

@Yinlin124
Copy link
Author

image

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

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