facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

HTML custom output #101

Closed nevven closed 1 year ago

nevven commented 4 years ago

MarkdownPreview saves/builds .html in the same path, would it be possible to specify a custom path?

thank you

facelessuser commented 4 years ago

Can you be more specific? How would this feature work? Are you looking for a global option per project?

@gir-bot remove S: triage @gir-bot add S: more-info-needed, T: feature

nevven commented 4 years ago

I'm not exactly sure how would it work, but was hoping you could specify something like "path_save": "/custom_path" in the settings, and it would save or build the .html there instead of source directory by default. Similar request exists for vscode but it's open almost 2 years, and i'm using your plugin exclusively, so thank you for your work.

facelessuser commented 4 years ago

If all that is desired is a global configuration where a user can specify all (not preview) built files to end up, that is doable. I don't see a reason why we can't do this.

@gir-bot lgtm @gir-bot add P: maybe

facelessuser commented 4 years ago

What would you do if you have two files with the same name? Specifying a common directory may cause build results to be overwritten?

nevven commented 4 years ago

Yes, overwritten would be expected behavior? Would specifying that common directory apply to save as html also? I'm aiming at repository of html files that would serve as a knowledge base written in markdown, md is great but html is universal and can be read on any device, if that make sense.

facelessuser commented 4 years ago

I'm not sure I like the idea of blindly overwriting. If I have two separate projects, and they both have readme.md, and I build them both, I cannot keep them both.

I need to think about how to approach this. With your use cases, this may not be a problem, but for others, I imagine it would be.

For saving as HTML, you maybe could popup panels to allow specifying a different name if there is a conflict, but not for the build system. You'd want a way to specify that properly without interaction.

I'll have to think about this.

nevven commented 4 years ago

You have a point, although that would not be the default behavior because you would need to change the settings, i understand you don't want to introduce a possible problem with a feature. All i can think at the moment is: possibly enable the custom path only for save to html, and than as you sad: if file name is the same it would pop-up and ask for overwrite?

facelessuser commented 1 year ago

For now, we are passing on this request. If things change in the future, we will create a new issue.