Hello world

September 20, 2019

 

Penn Genetics recently held a wonderful retreat at Bear Creek Moutain resort. I enjoyed the many wonderful scientific talks at the retreat, but I was most moved by Arjun Raj’s call to action: blog. At the retreat, Arjun also delivered a great talk on How to give a talk.

I have always wanted to start a blog since graduate school when I read Daniel Lakens’ post on why blog posts may have higher quality than scientific journals. I highly recommend you have a read. Personally, I think these posts are great for formalizing one’s thoughts on scientific concepts or experiment ideas. However, I feared that I needed to read a lot more before I write, and the lack of a personal website added to my hesitation.

A few days after the retreat, I stumbled upon Noam Ross’ newly created site on twitter, and I fell in love! The fonts, theme, basic Kube setups, Tufte design… everything I have ever wanted! Well, almost everything. The only thing I didn’t love is Noam’s choice of syntax highlighting, and his lua filter also didn’t quite work for me, so I removed this file and changed _output.yml to

blogdown::html_page:
  highlight: tango

Now, this action creates another issue. You see, this code adds to the generated .html style tags and everything in between

<style type="text/css">
[...]
</style>

which means Hugo .Summary is now filled with nonsense such as

a.sourceLine { display: inline-block; line-height: 1.25; }.

I try to strip out this style chunk with replaceRE and plainify in my layouts/section/blog.html, but that didn’t work. Finally, Yihui Xie’s post on how to generate a Hugo summary came to the rescue. Why didn’t I look for Yihui’s advice in the first place?! Following Yihui’s guide gets me very close but still not quite what is expected. Finally, 林志扬’s incredible insight saves the day.

I suggest using (.|\n)*? instead of .*? when searching for paragraph contents, since a single line break won’t start a new paragraph.

I probably should not have spent this much time on syntax highlighting, but I desperately wanted some highlighting. And yes, I do need a crash course on regular expression.

Here’s to the beginning of something new, a personal website that I’m, at the moment, very excited about. With or without scientific content, I hope to keep the blog updated with my musings. And who knows, I may be able use some material I write here for my scientific outputs (given the journal permits citations of blogposts).

The bike crew before heading back to Philly from Bear Creek (we did 120+ miles in total!). *Photoshop in our last biker Bill La Cava here*.


All posts | Penn Big Data: Opportunities and challenges in health science applications 1