Dedicated Stan blog

I’d like to start a dedicate Stan blog at <blog-name>.mc-stan.org.

Question 1: What should we call it?

Question 2. Who oversees content?

For (1), I would prefer it not be too cute or obscure.

For (2), I think ultimate responsibility should rest with whoever oversees the web site, which is now Breck. Hopefully it’ll all stay civil and we can just trust people to post the same way we trust them to use the wiki.

Question 3. Where is it hosted?

  • WordPress: nominal annual fee with domain mapping; supports MathJax; experience using WordPress among the team members; separate content and password management for blog; can’t edit comments (this drives me crazy they don’t let you do that yet).
  • GitHub: free; content gets managed with rest of web site; no comments built-in, so we’d need external service like Disqus (anyone know others?); more control and more management required on our side to set up styles, etc.

If I had to do this tomorrow, I’d just go with WordPress because it seems easier. Though I’d feel bad about it because I like to do everything on GitHub.

2 Likes

Question 4. Who has the time to write content?

Just a thought: If the documentation was primarily a website (not primarily PDF as it is now), wouldn’t almost everything that could go on the official blog also belong to the docs? I think that between Discourse, wiki and the docs there is only a small room for content curated/created by the core team that is not covered by any of the three.

As for technology, I’ve had good experience setting up blog with blogdown (Rmd to blog), but that might need some tweaking if Python is to be supported.

As for name, blog.mc-stan.org is conservative, but IMHO conveys exactly what is going on.

2 Likes

Agree on the URL. Name suggestion: “Samples”

1 Like

I think you have good answers to all of those questions and I’m happy to go with your inclinations, especially as you are likely the one to do most of the blogging at first.

I’d like to second blog.mc-stan.org and a lofty goal of integrating / cross-linking more of our documentation (which seems to involve getting the manual into HTML).

1 Like

Having never used GitHub for blogging, WP is fine. It has a bit of a laggy interface if you’re writing long posts with lots of equations/pictures, but it’s perfectly workable.

I’m not sure I see the advantage of a git interface unless you’re looking to allow external people to make PRs as a way to do occasionally “external contributor” blogs. Git would be much better than the WP system if this is what you’re looking for (afaik).

+1 for blog.mc-stan.org

There’s a bunch of stuff going out that would be good to put there. I write things and Daniel wanted to write some things.

2 Likes

That’s on the to-do list. I want to convert it to bookdown.

I think we can use the url blog.mc-stan.org and call it “The Stan Blog”.

Have you tried their hosted version or just Andrew’s? I find Andrew’s gets bogged down and even hangs and won’t let me log in from time to time. I found the WordPress version better.

Just a couple points on running a blog on GitHub (cause my personal one is there and so is Generable’s and I manage both:

  • it’s a bit clunky:
    • it’s not GitHub directly, but it’s actually run through Jekyll
    • they implement a version of Markdown that isn’t really that well documented, so you’ll run into gotchas
    • customization is fairly hard to do
    • running locally is actually trickier than they make it seem; once up, it works.
  • it’s easy to set up:
    • should take me an hour or less to get up and running
    • if we never stray from their default styles, it’s simple
  • comments need to be managed by something like Disqus: once set up, almost no maintenance. But even Disqus has a freemium model.
  • overall: it’s just not a real blog-in-a-box platform, so will require maintenance.

WordPress:

  • Andrew’s blog isn’t hosted by WordPress directly due to cost (at the time). It looks like their pricing changed since then. Back then, I remember it was in the multiple hundreds of dollars per month.
  • For our purposes, I think we’re far from any of those limits, so we can run it for free or on the cheap.
  • It’ll handle most of the things we need.

How well Wordpress works with equations? I would assume more equations in The Stan Blog than in Andrew’s blog.

Andrew’s Wordpress has a slightly annoying latex markdown. You write $latex [expression]$ and it usually works (sometimes it takes a few goes). I’ve done some posts with quite a few equations and it hasn’t been too annoying.

As an alternative to GitHub you may want to consider GitLab, which makes it straightforward to host and deploy a blog using Hugo: https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/

If you plan to write your posts in RMarkdown then the combination with RStudio and the blogdown package makes this a fairly slick setup.

Better than GitHub about of the box because it supports MathJax. Math goes in as $latex e^x$.

It’s fine for blog authors, even if the rendering requires web access.

It’s a pain for commenters because there’s no way for them to preview. I can’t believe they haven’t fixed this yet on WordPress.

Their site currently says:

GitLab has temporarily turned off custom domains support because of a security issue. The plan is to re-enable it after the 20th of February.

Probably not, though I suppose someone might be interested. At that point, we usually just publish case studies on the web, and that’s easy as things stand now with Jupyter or R markdown.

I was able to add MathJax support in a Jekyll blog adding the following script inside the _includes folder in a file named mathjax.html.

<!-- https://cdn.mathjax.org/mathjax/latest/MathJax.js -->
<script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        extensions: ["tex2jax.js"],
        jax: ["input/TeX", "output/HTML-CSS"],
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"] ],
          displayMath: [ ['$$','$$'], ["\[","\]"], ["\\[","\\]"] ],
          processEscapes: true
        },
        messageStyle: "none",
        "HTML-CSS": { availableFonts: ["TeX"] }
      });
    </script>
    <script type="text/javascript" 
            src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
            
    </script>

You then need to add a {% include mathjax.html %} in the default.html template.

Here is how I did it for a blog I just started.

IMHO, if you use something like Jekyll-now as a starting point, you can set up the blog in no time. In addition to that, you have version control, it’s inexpensive to maintain, and is easy to render the blog locally (including drafts) when you want to check how the article would look like before publishing it.

Another advantage of Jekyll-now is that you can enable comments and Google Analytics in minutes.

1 Like

Thanks! @breckbaldwin are you still working on this? If not, someone else might want to do it so we can get started.

I was able to get a pretty good blog on github.io using RBlogdown, which is pretty impressive since I’m a web programmer dilettante. It supports math stuff,
https://bookdown.org/yihui/blogdown/templates.html . The relevant bit is down on the page so I’ve reproduced below:

Support math expressions through MathJax. Add the code below to foot_custom.html.

<script src="//yihui.name/js/math-code.js"></script>
<script async
src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

This requires substantial knowledge of JavaScript and familiarity with MathJax to fully understand the code above, and we will leave the explanation of the code to Section B.3.

Note that bootcss.com is only one possible CDN host of MathJax, and you are free to use other hosts.

Here’s the blog from @spinkney:

and here’s the repo: https://github.com/spinkney/spinkney.github.io

It has Disqus plugged in for comments.

@spinkney: are there other style options? Did this just pick up the style of your blog (which would be great for our blog). If so, would you be able to configure a Stan blog and make a pull request? In which case, we can just turn it on without having to figure out all the config.

For some reason, dead links from Disqus seem to go to random pages. Any idea if that’s something we can control?