# How to create a pretty Julia post on Blogger.com

**URL:** <https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691>\
**Category:** Community\
**Created:** [March 7, 2021, 6:51pm UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691 "2021-03-07T18:51:23Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [March 7, 2021, 6:51pm UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/1 "2021-03-07T18:51:23Z")

</div>

I want to create a few posts about my success stories w/ Julia on [www.blogger.com](http://www.blogger.com).  
I’m having some trouble with:

1. writing math  
I can get `display mode` to work, but `inline mode` does not
2. Julia code boxes

Has anyone here had success making pretty blog posts w/ both math & Julia code snips on [www.blogger.com](http://www.blogger.com) or elsewhere?  
Can you please point me to good source?

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [March 10, 2021, 12:35am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/2 "2021-03-10T00:35:48Z")

</div>

I found this: [Make your Julia package in 10 minutes · Zlatan's Journal](https://zlatanvasovic.github.io/blog/2020/06/make-your-julia-package/)  
it has both pretty math (inline mode) & Julia code boxes.  
It ain’t on Blogger unfortunately…

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 10, 2021, 12:53am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/3 "2021-03-10T00:53:52Z")

</div>

> [@Albert\_Zevelev](#):
>
> It ain’t on Blogger unfortunately…

Yea his site was made with Franklin.jl which is definitely a good option for setting up your own site if you want math and code to display nicely.

Any reason it must be on Blogger? I’d imagine they could be less full-featured in these areas but I wouldn’t know for sure.

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [March 10, 2021, 12:58am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/4 "2021-03-10T00:58:27Z")

</div>

I already created a website & I ended up not using Franklin: [Research - Home](https://azev77.github.io/research/)  
I feel like it’d be easier to share on social media w/ a link to Blogger…

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 10, 2021, 1:03am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/5 "2021-03-10T01:03:41Z")

</div>

Quick peek looks like you are using Jekyll. There should definitely be good support for LaTeX display on Jekyll. Google turned up this [jekyll - How to support latex in GitHub-pages? - Stack Overflow](https://stackoverflow.com/questions/26275645/how-to-support-latex-in-github-pages)

I’d bet there is good code display as well, but not sure about correct syntax highlighting. I know it has been pushed to the wild because the team was trying to get StackOverflow to have it, but not sure what the status is.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 10, 2021, 1:04am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/6 "2021-03-10T01:04:54Z")

</div>

But! I’ll just throw out there that I think about half of the people blogging about Julia are doing so on Franklin.jl sites 😉

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [April 5, 2021, 2:22am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/8 "2021-04-05T02:22:53Z")

</div>

I think I’m gonna end up making the post on my own website.  
[https://azev77.github.io/Simpson\_OVB.html](https://azev77.github.io/Simpson_OVB.html)

Does anyone know how to make Julia code blocks in HTML?  
My current code blocks are ugly w/o syntax highlighting …  
@tlienart

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [April 5, 2021, 7:19am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/9 "2021-04-05T07:19:24Z")

</div>

What about weave.jl and publishing to html?

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [April 5, 2021, 7:21am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/10 "2021-04-05T07:21:17Z")

</div>

I’ve been making stats notes using weave.jl and saving output as .tex to play around in LaTeX and make nice pdfs. Sure you could do the same and convert to html with pandoc. Or just publish straight to html if that’s easier for you.

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [April 5, 2021, 7:28am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/11 "2021-04-05T07:28:48Z")

</div>

You can use highlight.js for instance it has good Julia highlighting 🙂

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [April 5, 2021, 7:37am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/12 "2021-04-05T07:37:39Z")

</div>

Guys, sorry I know almost nothing about making websites.  
Can someone please show me sample html code for Julia code box?

---

<div class="post-metadata">

**Author:** ![yoninazarathy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoninazarathy/32/10086_2.png) [@yoninazarathy](https://discourse.julialang.org/u/yoninazarathy)\
**Post date:** [April 5, 2021, 8:15am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/13 "2021-04-05T08:15:13Z")

</div>

In that case the Weave.jl suggestion above is probably the best because you’ll get stand-alone HTML pages that you could link to and won’t need to deal with Javascript and CSS stuff.

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [April 5, 2021, 8:29am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/14 "2021-04-05T08:29:02Z")

</div>

I don’t even know how to use weave.jl, I used a template powered by Jekyll & Academic pages.  
I tried using Franklin.jl but wasn’t getting much action so the template looked like the path of least resistance…

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [April 5, 2021, 9:06am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/15 "2021-04-05T09:06:55Z")

</div>

```nohighlight
<head>
...
<link rel="stylesheet" href="YYY/github.min.css">
...
</head>
<body>
...
<pre><code class="language-julia">
THE CODE HERE
</code></pre>
...
<script src="XXX/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();hljs.configure({tabReplace: ' '});</script>
</body>

```

where you would have to appropriately fill `XXX` and `YYY`. You could also use another stylesheet than `GitHub`; if you download the stuff from highlight.js you will see how to pick other stylesheets.

If this still seems too obscure, I’d reiterate what others have said before; generators try to make this stuff easier for you for a reason 🙂

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [April 5, 2021, 9:20am UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/16 "2021-04-05T09:20:47Z")

</div>

Maybe you will be interested in my research homepage hosted by Jekyll: it both math and Julia intensive. The source code is here: [GitHub - liuyxpp/liuyxpp.github.io: Homepage for my research group as an example of LYX Jekyll Theme.](https://github.com/liuyxpp/liuyxpp.github.io). And the page online is here: [http://www.yxliu.group/](http://www.yxliu.group/)

---

<div class="post-metadata">

**Author:** ![Wen-Wei\_Tseng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wen-wei_tseng/32/28839_2.png) [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Post date:** [April 5, 2021, 1:33pm UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/17 "2021-04-05T13:33:12Z")

</div>

Perhaps you are interested in blogging in [Hugo](https://gohugo.io/), the static site generator noted for its build speed. I wrote a [template github repo](https://github.com/sosiristseng/template-hugo-codeit) to blog Markdown and syntax highlighting as well as KaTeX math. GitHub and Gitlab CI/CD are included to automatic build / publish upon pushing changes.

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [April 5, 2021, 1:37pm UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/18 "2021-04-05T13:37:05Z")

</div>

I’m (very) far from an expert. But saving the following as a julia markdown file example.jmd

````julia
# Here is my website

I'm going to use **LaTex** and **Julia**.

### Here's some maths

$ f(x,y) = x^{x} + \frac{y}{x} $

### And some code

```julia

f(x,y) = x^x + y/x

f(2,3)```

````

And running `weave(example.jmd)`

produces

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/1/a1aa5d61da5f2695d291bd06df3487bf71dac57e.png)

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [April 11, 2021, 11:21pm UTC](https://discourse.julialang.org/t/how-to-create-a-pretty-julia-post-on-blogger-com/56691/19 "2021-04-11T23:21:12Z")

</div>

I ended up doing it in markdown:

> **[Simpson’s Paradox is a Special Case of Omitted Variable Bias](https://azev77.github.io/posts/2021/04/Simpson-OVB/)**
>
> The goal of this post is to illustrate a point made in a recent tweet by Amit Ghandi that Simpson’s Paradox is a special case of omitted variable bias.

Not ideal, but good enough…
