nishanths / cocoa-hugo-theme

Responsive Hugo blog theme (note: not actively worked on)
https://cocoa-hugo-theme-demo.netlify.app/
MIT License
326 stars 155 forks source link

Introducing mathematical formulas and fontawesome icons #156

Closed yuanj82 closed 9 months ago

yuanj82 commented 11 months ago

Introducing mathematical formulas and fontawesome icons

nishanths commented 10 months ago

i'm sorry for the slow review.

yuanj82 commented 10 months ago

I will finish it when I have free time.

于 2023年11月11日 GMT+08:00 下午7:03:08, Nishanth Shanmugham @.***> 写到:

@nishanths commented on this pull request.

@@ -32,3 +32,40 @@

{{ end }} + +<script type="text/javascript"

please add a mathjax property to config.toml, and make the new mathjax <script> and <style> elements conditional on its value being true. (if necessary, see similar code for highlightjs in the config.toml and in this file.)

{{ if .Site.Params.mathjax }}
 <script type="text/javascript"
 ...
{{ end }}

+for(i = 0; i < all.length; i += 1) {

  • all[i].SourceElement().parentNode.className += ' has-jax'; +} +}); +
  • + +<link rel="stylesheet" @.**@./css/all.min.css">

can you add a fontawesome property to config.toml? then make this stylesheet conditional on the property being true. for example:

{{ if .Site.Params.fontawesome }}
 <link rel="stylesheet" ***@***.******@***.***/css/all.min.css">
{{ end }}

(or feel free to separate the fontawesome additions into its own PR, if you prefer.)

  • github

can you please update the changes in this file to the following form?

{{ if .Site.Params.fontawesome }}
 /* use the font-awesome icon */
{{ else }}
 /* use icons from the "img" directory */
{{ end }}

we want to keep the original icons. otherwise it would be a breaking change for existing users.

-- Reply to this email directly or view it on GitHub: https://github.com/nishanths/cocoa-hugo-theme/pull/156#pullrequestreview-1726035685 You are receiving this because you authored the thread.

Message ID: @.***>