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

[Feature] Support GitHub style #4

Open
seagle0128 opened this issue Jul 30, 2022 · 7 comments
Open

[Feature] Support GitHub style #4

seagle0128 opened this issue Jul 30, 2022 · 7 comments

Comments

@seagle0128
Copy link

seagle0128 commented Jul 30, 2022

Hi, Thanks for the great package to preview the markdown buffer.

Could you please support GitHub CSS style?

@jcs090218
Copy link
Member

Would this work for you?

(setq impatient-showdown-flavor 'github)

@seagle0128
Copy link
Author

No. It's just change the markdown flavor, while not CSS style.

The preview should be like this.

image

@jcs090218
Copy link
Member

Hmm... you mean these variables?

(defcustom impatient-showdown-scripts
'("https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"
"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.17.1/build/highlight.min.js")
"File path for showdown highlight."
:type 'list
:group 'impatient-showdown)
(defcustom impatient-showdown-links
'("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/styles/github-gist.min.css")
"File path for showdown highlight."
:type 'list
:group 'impatient-showdown)

I have also make the template file custom variable, you can change the entire "look" by customizing the file path.

(setq impatient-showdown-preview-template "path/to/preview.html")

Hope these information help!

@seagle0128
Copy link
Author

I guess impatient-showdown-preview-template impacts the html style.

@jcs090218
Copy link
Member

impatient-showdown-preview-template is the HTML file use to render markdown. So you could define your own CSS on top.

@seagle0128
Copy link
Author

So can you please add an option to insert into the HTML template, and/or a GitHub CSS template?

@jcs090218
Copy link
Member

Hmm... not on top of my head. 😓 Unless there is a CDN GitHub CSS file we can reference on top of our html template. I have a quick Google Search on this, but came out without any good outcomes.

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