<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts | Pinaki Bhattacharyya</title><link>https://academic-devops.netlify.app/post/</link><atom:link href="https://academic-devops.netlify.app/post/index.xml" rel="self" type="application/rss+xml"/><description>Posts</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>Copyright © 2021 Me</copyright><image><url>https://academic-devops.netlify.app/media/icon_hu6b7e85408e3ea23d94c9220dcd22ef66_88376_512x512_fill_lanczos_center_2.png</url><title>Posts</title><link>https://academic-devops.netlify.app/post/</link></image><item><title>testing archetypes</title><link>https://academic-devops.netlify.app/post/testing-archetypes/</link><pubDate>Tue, 25 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/testing-archetypes/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/testing-archetypes/index_files/header-attrs/header-attrs.js">&lt;/script></description></item><item><title>testing reading time</title><link>https://academic-devops.netlify.app/post/testing-reading-time/</link><pubDate>Tue, 25 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/testing-reading-time/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/testing-reading-time/index_files/header-attrs/header-attrs.js">&lt;/script>
&lt;p>Fancy (re-)creating your website using Hugo, with or without blogdown?
Feeling &lt;a href="https://twitter.com/OscarBaruffa/status/1233133764282322945">a bit anxious&lt;/a>?
This post is aimed at being the Hugo equivalent of &lt;em>“What to know before you adopt a pet”&lt;/em>.
We shall go through things that can/will break in the future, and what you can do to prevent future pain.&lt;/p>
&lt;p>&lt;em>I’m writing this post with R users in mind, which means I shall use R analogies and mentioning &lt;code>blogdown&lt;/code>,
but I hope some aspects are generalizable to other potential Hugo adopters.&lt;/em>
&lt;em>Some aspects are specific to deploying your website using git and an online git platform such as GitHub.&lt;/em>&lt;/p>
&lt;div id="why-hugoblogdown" class="section level1">
&lt;h1>Why Hugo/blogdown?&lt;/h1>
&lt;p>If you’re reading this you’ve probably heard of Hugo somewhere.
It’s getting quite popular in the R community thanks to the &lt;code>blogdown&lt;/code> package, whose associated book features an &lt;a href="https://bookdown.org/yihui/blogdown/static-sites.html">excellent intro to why Hugo (and &lt;code>blogdown&lt;/code>)&lt;/a>.&lt;/p>
&lt;p>I myself have used Hugo for this website (with a bit of &lt;code>blogdown&lt;/code>) and dived into more details whilst &lt;a href="https://ropensci.org/technotes/2019/01/09/hugo/">working on tweaks to the rOpenSci website&lt;/a>.
I really enjoy working with this website generator, partly because it’s fast and open-source&lt;a href="#fn1" class="footnote-ref" id="fnref1">&lt;sup>1&lt;/sup>&lt;/a>.&lt;/p>
&lt;/div>
&lt;div id="what-can-break-or-evolve" class="section level1">
&lt;h1>What can break or evolve?&lt;/h1>
&lt;p>When you have a website created with Hugo, there are two to four main actors:&lt;/p>
&lt;ul>
&lt;li>&lt;p>Hugo itself which you could think of as R;&lt;/p>&lt;/li>
&lt;li>&lt;p>A Hugo &lt;em>theme&lt;/em> which defines the layout and style of your website. You could think of the theme as an R package. Your theme is a folder inside your website folder. You need one, no matter how minimal.&lt;/p>&lt;/li>
&lt;li>&lt;p>the other things your website theme might depend on, such as Font Awesome.&lt;/p>&lt;/li>
&lt;li>&lt;p>potential fourth actor: your tweaks to the theme which might be your editing an R package source; or maintaining a script/a second package on to of that R package to add some syntactic sugar or so to the existing functions of the package.&lt;/p>&lt;/li>
&lt;/ul>
&lt;p>So what’s going to break and evolve?&lt;/p>
&lt;ul>
&lt;li>&lt;p>Just like R packages need to keep up with changes to R sometimes, Hugo themes need to keep up with Hugo changes. Hugo is a trustworthy framework, that keeps improving, which however means sometimes removing support for some things or ways of doing them. Example: &lt;a href="https://github.com/yoshiharuyamashita/blackburn/commit/123ebe8bb4fd3708fc51dab42613e6a3a7d37d4c">this commit to the theme I’m using made a small change for making the theme compatible with Hugo&amp;gt;0.57&lt;/a>.&lt;/p>&lt;/li>
&lt;li>&lt;p>Just like R packages need to keep up with changes to their external dependencies (web APIs, data format standard), Hugo themes need to keep with changes to external dependencies (font providers, JS scripts, etc). Example: &lt;a href="https://github.com/yoshiharuyamashita/blackburn/commit/fef095af788816dbc27f040ca98eee3df6b60c1c">a commit to the theme I’m using that updates the templates to use the new syntax for Font Awesome icons&lt;/a>.&lt;/p>&lt;/li>
&lt;li>&lt;p>Just like R packages often improve with time, Hugo themes evolve. And just as you might like updating packages to get the best new tools, you might like getting the fancy features offered by a new version of your theme. For instance look at &lt;a href="https://sourcethemes.com/academic/updates/v4.6.0/">this release notes for some version of Hugo academic theme&lt;/a>: there are bug fixes but also cool improvements!&lt;/p>&lt;/li>
&lt;li>&lt;p>Just like your taste or needs of R packages in your script might evolve, e.g. you might want to update old scripts to use &lt;code>data.table&lt;/code> instead of &lt;code>dplyr&lt;/code>, you might even want to switch themes!&lt;/p>&lt;/li>
&lt;/ul>
&lt;/div>
&lt;div id="how-to-reduce-the-likelihood-of-breakages" class="section level1">
&lt;h1>How to reduce the likelihood of breakages?&lt;/h1>
&lt;div id="choose-your-theme-wisely-and-keep-in-touch" class="section level2">
&lt;h2>Choose your theme wisely and keep in touch!&lt;/h2>
&lt;p>When choosing a theme i.e. a collection of layouts for your website,
you’ll have aesthetics and practicalities in mind.
E.g. if you’re a prolific blogger you’ll want the posts to be quite prominent.
As the blogdown book mentions, &lt;a href="https://bookdown.org/yihui/blogdown/themes.html">also look at the theme’s popularity and activity&lt;/a> before adopting it.
This way you can have more trust in the theme’s responding to Hugo changes and to bug reports.&lt;/p>
&lt;p>Now, you’ll have to know when the theme gets updated. How?&lt;/p>
&lt;ul>
&lt;li>&lt;p>You could go hardcore git and make the theme &lt;a href="https://git-scm.com/book/en/v2/Git-Tools-Submodules">a git submodule&lt;/a> of your website repo.&lt;/p>&lt;/li>
&lt;li>&lt;p>You could &lt;a href="https://help.github.com/en/github/receiving-notifications-about-activity-on-github/watching-and-unwatching-releases-for-a-repository">watch i.e. subscribe to the GitHub releases of that theme&lt;/a>, or, if the maintainer(s) use a less formal workflow, watch all activity from that repo.&lt;/p>&lt;/li>
&lt;li>&lt;p>Any other idea? Maybe involving GitHub Actions, Dependabot, something else?
Maybe just a reminder to have a coffee date with your theme repo once in a while?&lt;/p>&lt;/li>
&lt;/ul>
&lt;/div>
&lt;div id="what-if-your-theme-gets-orphaned" class="section level2">
&lt;h2>What if your theme gets orphaned?&lt;/h2>
&lt;p>What if you chose your theme wisely but it lost its maintainer(s)?
In that case you’ll need to look into adopting it or rolling out your own version, or changing themes.&lt;/p>
&lt;/div>
&lt;div id="make-well-defined-tweaks-to-the-theme" class="section level2">
&lt;h2>Make well-defined tweaks to the theme&lt;/h2>
&lt;p>Although you’ve adopted a theme, you’ll probably want to personalize it a bit.
If you do so, do it with a good file structure and documentation hygiene!
As &lt;a href="https://bookdown.org/yihui/blogdown/custom-layouts.html">very well explained in the &lt;code>blogdown&lt;/code> book&lt;/a>,&lt;/p>
&lt;ul>
&lt;li>&lt;p>some tweaks are directly supported by the theme via the website config file (think of it as an R function parameters) e.g. adding your name to the homepage rather than Jane Doe’s;&lt;/p>&lt;/li>
&lt;li>&lt;p>some tweaks require your writing layout files (think of it as writing a wrapper for an R package/re-writing your own version of some functions) e.g. adding some fun sentence to the footer which the original theme doesn’t support. In this case you should store your custom layouts, like the fancy footer partial template, in a folder called &lt;code>layouts/&lt;/code> at the root of your website folder; &lt;em>not&lt;/em> in the theme folder. &lt;a href="https://gohugo.io/templates/lookup-order/">Hugo will give priority to &lt;code>layouts/&lt;/code> stuff when defined&lt;/a>, to use them on top of theme stuff; and you’ll easily see what you changed. Your future self will probably find much joy in your present self’s documenting the why and how of your custom layouts in some sort of developer notes. The more custom layouts you write, the greater your future responsability.&lt;/p>&lt;/li>
&lt;/ul>
&lt;p>&lt;em>If you define CSS and JS files, they’d live in &lt;code>static/&lt;/code> and be referred to in the website config file.&lt;/em>&lt;/p>
&lt;/div>
&lt;div id="imho-have-your-content-as-markdown-not-html-files" class="section level2">
&lt;h2>IMHO Have your content as Markdown, not html files&lt;/h2>
&lt;p>With &lt;code>blogdown&lt;/code> you can use .Rmd, .RMarkdown or .md as your website source, refer to &lt;a href="https://bookdown.org/yihui/blogdown/output-format.html">this exhaustive and clear comparison&lt;/a>.
I am strongly in favour of never using .Rmd in a blogdown site because its output is an html file, not a .markdown/.md file. html files seem less portable to me. I like the idea of being able to take my Markdown content and rather easily move them to a new theme (or even a new framework, like when I migrated this website &lt;a href="https://bookdown.org/yihui/blogdown/from-jekyll.html">from Jekyll&lt;/a>).&lt;/p>
&lt;p>Now, as explained in the table mentioned above, using .RMarkdown/.md has its limitations.
For html widgets I can recommend looking at &lt;a href="https://www.reconlearn.org/post/tutorial-post-creation.html#html-widgets-plotly-leaflet">the setup Steph Locke created for the RECON learn website&lt;/a>.&lt;/p>
&lt;/div>
&lt;div id="update-your-theme" class="section level2">
&lt;h2>Update your theme&lt;/h2>
&lt;p>So if you’ve tweaked cleanly, you can update your theme when needed!
If you work with version control, and &lt;a href="https://happygitwithr.com/">you probably should&lt;/a>, make a branch and work on the update in that branch.
If you don’t, backup your website’s current state first.&lt;/p>
&lt;p>To “update your theme”, you need to replace the theme folder of your website folder with the new theme files.&lt;/p>
&lt;p>You could do update the theme manually, or use &lt;code>blogdown::install_theme()&lt;/code> with &lt;code>force = TRUE&lt;/code>.&lt;/p>
&lt;p>Build your website, look at what needs to be changed:&lt;/p>
&lt;ul>
&lt;li>&lt;p>maybe the config parameter names changed (like an R function which would have renamed one of the parameters);&lt;/p>&lt;/li>
&lt;li>&lt;p>your custom layout might need some work too.&lt;/p>&lt;/li>
&lt;/ul>
&lt;p>To figure out what needs to be changed, you’ll probably want to read the changelog (or commit history) of your theme, and maybe even Hugo changelog.&lt;/p>
&lt;p>Often, changes in your theme, and work needed on your website, won’t be dramatic: the theme folder update, maybe one config parameter, a few lines diff in your custom layouts.&lt;/p>
&lt;/div>
&lt;div id="follow-hugo-news" class="section level2">
&lt;h2>Follow Hugo news?&lt;/h2>
&lt;p>If you wrote no custom layouts and use a very well maintained theme, you might never need to keep up with Hugo changes yourself.
However, if you’ve written Hugo custom layouts, or strive to become a contributor to your theme, you might want to read &lt;a href="https://gohugo.io/news/">Hugo changelogs&lt;/a>, follow &lt;a href="https://github.com/gohugoio/hugo">Hugo’s source repository&lt;/a>, or &lt;a href="https://twitter.com/GoHugoIO">Hugo’s Twitter account&lt;/a>, etc.&lt;/p>
&lt;p>Edit in May 2020. After asking on the Hugo forum how to follow Hugo more automatically for websites I (co-)maintain on GitHub, I ended up &lt;a href="https://discourse.gohugo.io/t/how-to-follow-install-hugo-updates-more-automatically/24950/4">creating a GitHub Actions workflow&lt;/a> that will look for Hugo updates once a month, and if needed open a PR amending Hugo version in the Netlify config file.&lt;/p>
&lt;/div>
&lt;div id="dont-live-on-the-edge" class="section level2">
&lt;h2>Don’t live on the edge&lt;/h2>
&lt;p>If you have a workflow on a continuous integration system updating your website every day from an external data source, &lt;a href="https://www.noamross.net/2019/08/09/a-new-website/">like Noam Ross&lt;/a> and &lt;a href="https://www.jimhester.com/">Jim Hester&lt;/a> do (yes that’s a very cool and very fancy setup!), use a specific Hugo version there, don’t let the workflow install Hugo’s latest version because it could break your website without your noticing.
Update Hugo with intent, after reading a bit and/or testing it doesn’t break your website.&lt;/p>
&lt;/div>
&lt;div id="what-if-i-just-never-update-hugo-or-my-theme" class="section level2">
&lt;h2>What if I just never update Hugo or my theme?&lt;/h2>
&lt;p>No, it’s not a good solution in my opinion.
Never updating Hugo (neither locally nor on say Netlify) nor your theme probably means your website will still build as it used to.
However, updates to Hugo/themes contain both improvements and &lt;strong>bug fixes&lt;/strong> so it’s better to know you’ll probably update the tools at least once in a while.&lt;/p>
&lt;/div>
&lt;/div>
&lt;div id="quick-fixes-to-bad-news" class="section level1">
&lt;h1>Quick fixes to bad news&lt;/h1>
&lt;p>Imagine you made yourself a pretty website to showcase your cool posts and informative slidedecks.
In the meantime, you changed laptops and today Saturday you want to post the link to your talk from last week,
before you head out for a barbecue with friends.
Your laptop doesn’t have Hugo installed so you install its latest version using &lt;code>blogdown::install_hugo()&lt;/code>, add your talk page, build the website, look at the preview and… notice it all looks wonky! Your website is broken!
If you remember the beginning of this post, what happened is probably an update in Hugo breaking your theme version. You’ll eventually need to update your theme.&lt;/p>
&lt;p>But you don’t have time right now before your barbecue to do that, let alone to learn how to do that if it’s the first time, so what can you do apart from not posting your talk content?&lt;/p>
&lt;div id="if-your-site-is-deployed-by-gh-pages" class="section level2">
&lt;h2>If your site is deployed by gh-pages&lt;/h2>
&lt;p>I.e. your build your website locally and then push the rendered content to a gh-pages branch of a GitHub repo, you need to retrograde Hugo before doing that. Note that &lt;code>blogdown::install_hugo()&lt;/code> has a &lt;code>version&lt;/code> argument, refer to Hugo changelogs to see what version you had last used.&lt;/p>
&lt;/div>
&lt;div id="if-your-site-is-deployed-by-netlify" class="section level2">
&lt;h2>If your site is deployed by Netlify&lt;/h2>
&lt;p>If you’re lucky, you can just push your content, and since the Hugo version of your Netlify’s config file hasn’t changed, your website will build smoothly. You could make a PR to your own website to get a preview there before merging.&lt;/p>
&lt;/div>
&lt;div id="later" class="section level2">
&lt;h2>Later&lt;/h2>
&lt;p>Eventually, one day soon, get to updating Hugo again, looking at your theme’s changes, if needed extracting your tweaks from the theme folder if you made them there (I’ve done that, and now I sure stick to using the &lt;code>layouts/&lt;/code> folder as mentioned earlier).
Use some of the tips of the beginning of the post to reduce the likelihood of the scenario happening again.&lt;/p>
&lt;/div>
&lt;/div>
&lt;div id="conclusion" class="section level1">
&lt;h1>Conclusion&lt;/h1>
&lt;p>In this blog post I presented what the maintenance of a Hugo website entails in my experience.
I haven’t mentioned other possible sources of breakage that are not specific to Hugo:&lt;/p>
&lt;ul>
&lt;li>&lt;p>&lt;a href="https://ropensci.org/technotes/2019/12/19/urls-tidying/">URLs in the content getting obsolete&lt;/a>;&lt;/p>&lt;/li>
&lt;li>&lt;p>Your changing deploy workflows (so use your own domain instead of a Netlify’s one?);&lt;/p>&lt;/li>
&lt;li>&lt;p>Your website source disappearing (so use backups);&lt;/p>&lt;/li>
&lt;li>&lt;p>etc.&lt;/p>&lt;/li>
&lt;/ul>
&lt;p>Coming back to Hugo, if you encounter problems I’d unsurprisingly recommend &lt;a href="https://gohugo.io/documentation/">Hugo docs&lt;/a> and &lt;a href="https://discourse.gohugo.io/">Hugo forum&lt;/a>.&lt;/p>
&lt;p>Now, if this all sounds overwhelming, I don’t think these tech skills are harder than R skills but time is a limited resource so maybe you could outsource some of your website’s creating and maintenance.
Maybe you can hire someone, or do a skill swap?&lt;/p>
&lt;p>Don’t hesitate to share your own experience and advice on maintaining Hugo websites!&lt;/p>
&lt;/div>
&lt;div class="footnotes">
&lt;hr />
&lt;ol>
&lt;li id="fn1">&lt;p>Also because I love the font of &lt;a href="https://gohugo.io/documentation/">its docs website&lt;/a> and looking at pages full of curly braces.&lt;a href="#fnref1" class="footnote-back">↩︎&lt;/a>&lt;/p>&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>testing survey archetype</title><link>https://academic-devops.netlify.app/post/testing-survey-archetype/</link><pubDate>Tue, 25 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/testing-survey-archetype/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/testing-survey-archetype/index_files/header-attrs/header-attrs.js">&lt;/script>
&lt;p>&lt;strong>doi:&lt;/strong> &lt;a href="https://doi.org/10.1103/PhysRevLett.125.140604https://" class="uri">https://doi.org/10.1103/PhysRevLett.125.140604https://&lt;/a>
&lt;strong>Abstract:&lt;/strong>
This Letter presents a neural estimator for entropy production (NEEP), that estimates entropy production (EP) from trajectories of relevant variables without detailed information on the system dynamics. For steady state, we rigorously proved that the estimator, which can be built up from different choices of deep neural networks, provides stochastic EP by optimizing the objective function proposed here. We verify the NEEP with the stochastic processes of the bead spring and discrete flashing ratchet models and also demonstrate that our method is applicable to high-dimensional data and can provide coarse-grained EP for Markov systems with unobservable states.&lt;/p>
&lt;div id="summary-notes" class="section level1">
&lt;h1>Summary Notes&lt;/h1>
&lt;p>My Own Notes and key takeaways.&lt;/p>
&lt;/div>
&lt;div id="further-reading" class="section level1">
&lt;h1>Further Reading&lt;/h1>
&lt;p>Or better bibtex type citations?
* &lt;a href="">Reference 1 title&lt;/a>
* &lt;a href="">Reference 2 title&lt;/a>&lt;/p>
&lt;/div></description></item><item><title>Learning Entropy Production via Neural Networks - Phys. Rev. Lett. 2000</title><link>https://academic-devops.netlify.app/post/learning-entropy-production-via-neural-networks/</link><pubDate>Mon, 24 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/learning-entropy-production-via-neural-networks/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/learning-entropy-production-via-neural-networks/index.en_files/header-attrs/header-attrs.js">&lt;/script>
&lt;p>We developed the neural estimator for entropy production (NEEP), a novel type of estimator that evaluates entropy production from the trajectories of system variables by deep learning. In the macroscopic world, entropy never decreases as time moves forward; for instance, spilled water will not spontaneously jump back into its cup. However, entropy can in fact transiently decrease in small systems due to environmental fluctuations. Physicists have found that such an entropy difference, called entropy production (EP), can be measured by estimating the probability that a time-reversed trajectory, which is like playing a recorded video from an experiment backward, will be observed. Various EP estimators based on this method have been developed, but the required trajectory data needs to first be divided into discrete microstates. In contrast to these conventional methods, NEEP does not require such detailed information to estimate the probability of time-reversed trajectories, and further, NEEP can efficiently learn EP from data even in high-dimensional space. We additionally verified that our approach is even applicable to time-series data with unobservable variables. We expect NEEP to be beneficial in applications to intricately organized systems where numerous variables are entangled and hidden, such as biological systems, active matter, and others, for a deeper look into their complex dynamics.&lt;/p>
&lt;p>&lt;a href="https://github.com/kdkyum/neep">PyTorch Implementation&lt;/a>&lt;/p></description></item><item><title>testing opengraph</title><link>https://academic-devops.netlify.app/post/testing-opengraph/</link><pubDate>Mon, 24 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/testing-opengraph/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/testing-opengraph/index_files/header-attrs/header-attrs.js">&lt;/script>
&lt;p>We developed the neural estimator for entropy production (NEEP), a novel type of estimator that evaluates entropy production from the trajectories of system variables by deep learning. In the macroscopic world, entropy never decreases as time moves forward; for instance, spilled water will not spontaneously jump back into its cup. However, entropy can in fact transiently decrease in small systems due to environmental fluctuations. Physicists have found that such an entropy difference, called entropy production (EP), can be measured by estimating the probability that a time-reversed trajectory, which is like playing a recorded video from an experiment backward, will be observed. Various EP estimators based on this method have been developed, but the required trajectory data needs to first be divided into discrete microstates. In contrast to these conventional methods, NEEP does not require such detailed information to estimate the probability of time-reversed trajectories, and further, NEEP can efficiently learn EP from data even in high-dimensional space. We additionally verified that our approach is even applicable to time-series data with unobservable variables. We expect NEEP to be beneficial in applications to intricately organized systems where numerous variables are entangled and hidden, such as biological systems, active matter, and others, for a deeper look into their complex dynamics.
&lt;img src="images/brw.png" />&lt;/p>
&lt;p>&lt;a href="https://github.com/kdkyum/neep">PyTorch Implementation&lt;/a>&lt;/p></description></item><item><title>testing new post without date</title><link>https://academic-devops.netlify.app/post/testing-new-post-without-date/</link><pubDate>Sat, 22 May 2021 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/testing-new-post-without-date/</guid><description/></item><item><title>Welcome to Wowchemy, the website builder for Hugo</title><link>https://academic-devops.netlify.app/post/getting-started/</link><pubDate>Sun, 13 Dec 2020 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/getting-started/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;ol>
&lt;li>The Wowchemy website builder for Hugo, along with its starter templates, is designed for professional creators, educators, and teams/organizations - although it can be used to create any kind of site&lt;/li>
&lt;li>The template can be modified and customised to suit your needs. It&amp;rsquo;s a good platform for anyone looking to take control of their data and online identity whilst having the convenience to start off with a &lt;strong>no-code solution (write in Markdown and customize with YAML parameters)&lt;/strong> and having &lt;strong>flexibility to later add even deeper personalization with HTML and CSS&lt;/strong>&lt;/li>
&lt;li>You can work with all your favourite tools and apps with hundreds of plugins and integrations to speed up your workflows, interact with your readers, and much more&lt;/li>
&lt;/ol>
&lt;h2 id="get-started">Get Started&lt;/h2>
&lt;ul>
&lt;li>👉 &lt;a href="https://wowchemy.com/templates/" target="_blank" rel="noopener">&lt;strong>Create a new site&lt;/strong>&lt;/a>&lt;/li>
&lt;li>📚 &lt;a href="https://wowchemy.com/docs/" target="_blank" rel="noopener">&lt;strong>Personalize your site&lt;/strong>&lt;/a>&lt;/li>
&lt;li>💬 &lt;a href="https://discord.gg/z8wNYzb" target="_blank" rel="noopener">Chat with the &lt;strong>Wowchemy community&lt;/strong>&lt;/a> or &lt;a href="https://discourse.gohugo.io" target="_blank" rel="noopener">&lt;strong>Hugo community&lt;/strong>&lt;/a>&lt;/li>
&lt;li>🐦 Twitter: &lt;a href="https://twitter.com/wowchemy" target="_blank" rel="noopener">@wowchemy&lt;/a> &lt;a href="https://twitter.com/GeorgeCushen" target="_blank" rel="noopener">@GeorgeCushen&lt;/a> &lt;a href="https://twitter.com/search?q=%28%23MadeWithWowchemy%20OR%20%23MadeWithAcademic%29&amp;amp;src=typed_query" target="_blank" rel="noopener">#MadeWithWowchemy&lt;/a>&lt;/li>
&lt;li>💡 &lt;a href="https://github.com/wowchemy/wowchemy-hugo-modules/issues" target="_blank" rel="noopener">Request a &lt;strong>feature&lt;/strong> or report a &lt;strong>bug&lt;/strong> for &lt;em>Wowchemy&lt;/em>&lt;/a>&lt;/li>
&lt;li>⬆️ &lt;strong>Updating Wowchemy?&lt;/strong> View the &lt;a href="https://wowchemy.com/docs/guide/update/" target="_blank" rel="noopener">Update Guide&lt;/a> and &lt;a href="https://wowchemy.com/updates/" target="_blank" rel="noopener">Release Notes&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="crowd-funded-open-source-software">Crowd-funded open-source software&lt;/h2>
&lt;p>To help us develop this template and software sustainably under the MIT license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship.&lt;/p>
&lt;h3 id="-click-here-to-become-a-sponsor-and-help-support-wowchemys-future-httpswowchemycomplans">&lt;a href="https://wowchemy.com/plans/" target="_blank" rel="noopener">❤️ Click here to become a sponsor and help support Wowchemy&amp;rsquo;s future ❤️&lt;/a>&lt;/h3>
&lt;p>As a token of appreciation for sponsoring, you can &lt;strong>unlock &lt;a href="https://wowchemy.com/plans/" target="_blank" rel="noopener">these&lt;/a> awesome rewards and extra features 🦄✨&lt;/strong>&lt;/p>
&lt;h2 id="ecosystem">Ecosystem&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;a href="https://github.com/wowchemy/hugo-academic-cli" target="_blank" rel="noopener">Hugo Academic CLI&lt;/a>:&lt;/strong> Automatically import publications from BibTeX&lt;/li>
&lt;/ul>
&lt;h2 id="inspiration">Inspiration&lt;/h2>
&lt;p>&lt;a href="https://academic-demo.netlify.com/" target="_blank" rel="noopener">Check out the latest &lt;strong>demo&lt;/strong>&lt;/a> of what you&amp;rsquo;ll get in less than 10 minutes, or &lt;a href="https://wowchemy.com/user-stories/" target="_blank" rel="noopener">view the &lt;strong>showcase&lt;/strong>&lt;/a> of personal, project, and business sites.&lt;/p>
&lt;h2 id="features">Features&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Page builder&lt;/strong> - Create &lt;em>anything&lt;/em> with &lt;a href="https://wowchemy.com/docs/page-builder/" target="_blank" rel="noopener">&lt;strong>widgets&lt;/strong>&lt;/a> and &lt;a href="https://wowchemy.com/docs/writing-markdown-latex/" target="_blank" rel="noopener">&lt;strong>elements&lt;/strong>&lt;/a>&lt;/li>
&lt;li>&lt;strong>Edit any type of content&lt;/strong> - Blog posts, publications, talks, slides, projects, and more!&lt;/li>
&lt;li>&lt;strong>Create content&lt;/strong> in &lt;a href="https://wowchemy.com/docs/writing-markdown-latex/" target="_blank" rel="noopener">&lt;strong>Markdown&lt;/strong>&lt;/a>, &lt;a href="https://wowchemy.com/docs/import/jupyter/" target="_blank" rel="noopener">&lt;strong>Jupyter&lt;/strong>&lt;/a>, or &lt;a href="https://wowchemy.com/docs/install-locally/" target="_blank" rel="noopener">&lt;strong>RStudio&lt;/strong>&lt;/a>&lt;/li>
&lt;li>&lt;strong>Plugin System&lt;/strong> - Fully customizable &lt;a href="https://wowchemy.com/docs/customization/" target="_blank" rel="noopener">&lt;strong>color&lt;/strong> and &lt;strong>font themes&lt;/strong>&lt;/a>&lt;/li>
&lt;li>&lt;strong>Display Code and Math&lt;/strong> - Code highlighting and &lt;a href="https://en.wikibooks.org/wiki/LaTeX/Mathematics" target="_blank" rel="noopener">LaTeX math&lt;/a> supported&lt;/li>
&lt;li>&lt;strong>Integrations&lt;/strong> - &lt;a href="https://analytics.google.com" target="_blank" rel="noopener">Google Analytics&lt;/a>, &lt;a href="https://disqus.com" target="_blank" rel="noopener">Disqus commenting&lt;/a>, Maps, Contact Forms, and more!&lt;/li>
&lt;li>&lt;strong>Beautiful Site&lt;/strong> - Simple and refreshing one page design&lt;/li>
&lt;li>&lt;strong>Industry-Leading SEO&lt;/strong> - Help get your website found on search engines and social media&lt;/li>
&lt;li>&lt;strong>Media Galleries&lt;/strong> - Display your images and videos with captions in a customizable gallery&lt;/li>
&lt;li>&lt;strong>Mobile Friendly&lt;/strong> - Look amazing on every screen with a mobile friendly version of your site&lt;/li>
&lt;li>&lt;strong>Multi-language&lt;/strong> - 34+ language packs including English, 中文, and Português&lt;/li>
&lt;li>&lt;strong>Multi-user&lt;/strong> - Each author gets their own profile page&lt;/li>
&lt;li>&lt;strong>Privacy Pack&lt;/strong> - Assists with GDPR&lt;/li>
&lt;li>&lt;strong>Stand Out&lt;/strong> - Bring your site to life with animation, parallax backgrounds, and scroll effects&lt;/li>
&lt;li>&lt;strong>One-Click Deployment&lt;/strong> - No servers. No databases. Only files.&lt;/li>
&lt;/ul>
&lt;h2 id="themes">Themes&lt;/h2>
&lt;p>Wowchemy and its templates come with &lt;strong>automatic day (light) and night (dark) mode&lt;/strong> built-in. Alternatively, visitors can choose their preferred mode - click the moon icon in the top right of the &lt;a href="https://academic-demo.netlify.com/" target="_blank" rel="noopener">Demo&lt;/a> to see it in action! Day/night mode can also be disabled by the site admin in &lt;code>params.toml&lt;/code>.&lt;/p>
&lt;p>&lt;a href="https://wowchemy.com/docs/customization" target="_blank" rel="noopener">Choose a stunning &lt;strong>theme&lt;/strong> and &lt;strong>font&lt;/strong>&lt;/a> for your site. Themes are fully customizable.&lt;/p>
&lt;h2 id="license">License&lt;/h2>
&lt;p>Copyright 2016-present &lt;a href="https://georgecushen.com" target="_blank" rel="noopener">George Cushen&lt;/a>.&lt;/p>
&lt;p>Released under the &lt;a href="https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md" target="_blank" rel="noopener">MIT&lt;/a> license.&lt;/p></description></item><item><title>Hello R Markdown</title><link>https://academic-devops.netlify.app/post/2020-12-01-r-rmarkdown/</link><pubDate>Tue, 01 Dec 2020 21:13:14 -0500</pubDate><guid>https://academic-devops.netlify.app/post/2020-12-01-r-rmarkdown/</guid><description>
&lt;script src="https://academic-devops.netlify.app/post/2020-12-01-r-rmarkdown/index.en_files/header-attrs/header-attrs.js">&lt;/script>
&lt;div id="r-markdown" class="section level1">
&lt;h1>R Markdown&lt;/h1>
&lt;p>This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see &lt;a href="http://rmarkdown.rstudio.com" class="uri">http://rmarkdown.rstudio.com&lt;/a>.&lt;/p>
&lt;p>You can embed an R code chunk like this:&lt;/p>
&lt;pre class="r">&lt;code>summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
fit &amp;lt;- lm(dist ~ speed, data = cars)
fit
##
## Call:
## lm(formula = dist ~ speed, data = cars)
##
## Coefficients:
## (Intercept) speed
## -17.579 3.932&lt;/code>&lt;/pre>
&lt;/div>
&lt;div id="including-plots" class="section level1">
&lt;h1>Including Plots&lt;/h1>
&lt;p>You can also embed plots. See Figure &lt;a href="#fig:pie">1&lt;/a> for example:&lt;/p>
&lt;pre class="r">&lt;code>par(mar = c(0, 1, 0, 1))
pie(
c(280, 60, 20),
c(&amp;#39;Sky&amp;#39;, &amp;#39;Sunny side of pyramid&amp;#39;, &amp;#39;Shady side of pyramid&amp;#39;),
col = c(&amp;#39;#0292D8&amp;#39;, &amp;#39;#F7EA39&amp;#39;, &amp;#39;#C4B632&amp;#39;),
init.angle = -50, border = NA
)&lt;/code>&lt;/pre>
&lt;div class="figure">&lt;span id="fig:pie">&lt;/span>
&lt;img src="https://academic-devops.netlify.app/post/2020-12-01-r-rmarkdown/index.en_files/figure-html/pie-1.png" alt="A fancy pie chart." width="672" />
&lt;p class="caption">
Figure 1: A fancy pie chart.
&lt;/p>
&lt;/div>
&lt;/div></description></item><item><title>Writing technical content in Academic</title><link>https://academic-devops.netlify.app/post/writing-technical-content/</link><pubDate>Fri, 12 Jul 2019 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/writing-technical-content/</guid><description>&lt;p>Academic is designed to give technical content creators a seamless experience. You can focus on the content and Academic handles the rest.&lt;/p>
&lt;p>&lt;strong>Highlight your code snippets, take notes on math classes, and draw diagrams from textual representation.&lt;/strong>&lt;/p>
&lt;p>On this page, you&amp;rsquo;ll find some examples of the types of technical content that can be rendered with Academic.&lt;/p>
&lt;h2 id="examples">Examples&lt;/h2>
&lt;h3 id="code">Code&lt;/h3>
&lt;p>Academic supports a Markdown extension for highlighting code syntax. You can enable this feature by toggling the &lt;code>highlight&lt;/code> option in your &lt;code>config/_default/params.toml&lt;/code> file.&lt;/p>
&lt;pre>&lt;code>```python
import pandas as pd
data = pd.read_csv(&amp;quot;data.csv&amp;quot;)
data.head()
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-python">import pandas as pd
data = pd.read_csv(&amp;quot;data.csv&amp;quot;)
data.head()
&lt;/code>&lt;/pre>
&lt;h3 id="charts">Charts&lt;/h3>
&lt;p>Academic supports the popular &lt;a href="https://plot.ly/" target="_blank" rel="noopener">Plotly&lt;/a> chart format.&lt;/p>
&lt;p>Save your Plotly JSON in your page folder, for example &lt;code>chart.json&lt;/code>, and then add the &lt;code>{{&amp;lt; chart data=&amp;quot;chart&amp;quot; &amp;gt;}}&lt;/code> shortcode where you would like the chart to appear.&lt;/p>
&lt;p>Demo:&lt;/p>
&lt;div id="chart-265481739" class="chart">&lt;/div>
&lt;script>
(function() {
let a = setInterval( function() {
if ( typeof window.Plotly === 'undefined' ) {
return;
}
clearInterval( a );
Plotly.d3.json("./line-chart.json", function(chart) {
Plotly.plot('chart-265481739', chart.data, chart.layout, {responsive: true});
});
}, 500 );
})();
&lt;/script>
&lt;p>You might also find the &lt;a href="http://plotly-json-editor.getforge.io/" target="_blank" rel="noopener">Plotly JSON Editor&lt;/a> useful.&lt;/p>
&lt;h3 id="math">Math&lt;/h3>
&lt;p>Academic supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the &lt;code>math&lt;/code> option in your &lt;code>config/_default/params.toml&lt;/code> file.&lt;/p>
&lt;p>To render &lt;em>inline&lt;/em> or &lt;em>block&lt;/em> math, wrap your LaTeX math with &lt;code>$...$&lt;/code> or &lt;code>$$...$$&lt;/code>, respectively.&lt;/p>
&lt;p>Example &lt;strong>math block&lt;/strong>:&lt;/p>
&lt;pre>&lt;code class="language-latex">$$\gamma_{n} = \frac{
\left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T
\left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}
{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;p>$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left |\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right |^2}$$&lt;/p>
&lt;p>Example &lt;strong>inline math&lt;/strong> &lt;code>$\nabla F(\mathbf{x}_{n})$&lt;/code> renders as $\nabla F(\mathbf{x}_{n})$.&lt;/p>
&lt;p>Example &lt;strong>multi-line math&lt;/strong> using the &lt;code>\\\\&lt;/code> math linebreak:&lt;/p>
&lt;pre>&lt;code class="language-latex">$$f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} &amp;amp; \text{if }k=1, \\\\
1-p_{0}^{*} &amp;amp; \text{if }k=0.\end{cases}$$
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;p>$$f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} &amp;amp; \text{if }k=1, \\&lt;br>
1-p_{0}^{*} &amp;amp; \text{if }k=0.\end{cases}$$&lt;/p>
&lt;h3 id="shortcodes">Shortcodes&lt;/h3>
&lt;p>&lt;strong>Expand&lt;/strong>
&lt;div class="expand">
&lt;div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});">
&lt;i style="font-size:large;" class="fas fa-chevron-right">&lt;/i>
&lt;span>
Click me!
&lt;/span>
&lt;/div>
&lt;div class="expand-content" style="display: none;">
Hidden content
&lt;/div>
&lt;/div>&lt;/p>
&lt;p>&lt;strong>Video&lt;/strong>&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/2xkNJL4gJ9E" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div>
&lt;p>&lt;strong>Alert&lt;/strong>&lt;/p>
&lt;div class="alert alert-note">
&lt;div>
Academic supports a Markdown extension for diagrams.
&lt;/div>
&lt;/div>
&lt;p>&lt;strong>Button&lt;/strong>
&lt;a href="https://gist.github.com/talves/2d4973064d07c42424cdf56e9bcf31d1#file-link-button-sc-html" target="_blank" class="btn btn-default">
&lt;/p>
&lt;h3 id="diagrams">Diagrams&lt;/h3>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/2xkNJL4gJ9E" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div>
&lt;div class="alert alert-note">
&lt;div>
Academic supports a Markdown extension for diagrams.
&lt;/div>
&lt;/div>
You can enable this feature by toggling the `diagram` option in your `config/_default/params.toml` file or by adding `diagram: true` to your page front matter.
&lt;p>An example &lt;strong>flowchart&lt;/strong>:&lt;/p>
&lt;pre>&lt;code>```mermaid
graph TD
A[Hard] --&amp;gt;|Text| B(Round)
B --&amp;gt; C{Decision}
C --&amp;gt;|One| D[Result 1]
C --&amp;gt;|Two| E[Result 2]
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-mermaid">graph TD
A[Hard] --&amp;gt;|Text| B(Round)
B --&amp;gt; C{Decision}
C --&amp;gt;|One| D[Result 1]
C --&amp;gt;|Two| E[Result 2]
&lt;/code>&lt;/pre>
&lt;p>An example &lt;strong>sequence diagram&lt;/strong>:&lt;/p>
&lt;pre>&lt;code>```mermaid
sequenceDiagram
Alice-&amp;gt;&amp;gt;John: Hello John, how are you?
loop Healthcheck
John-&amp;gt;&amp;gt;John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John--&amp;gt;&amp;gt;Alice: Great!
John-&amp;gt;&amp;gt;Bob: How about you?
Bob--&amp;gt;&amp;gt;John: Jolly good!
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-mermaid">sequenceDiagram
Alice-&amp;gt;&amp;gt;John: Hello John, how are you?
loop Healthcheck
John-&amp;gt;&amp;gt;John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John--&amp;gt;&amp;gt;Alice: Great!
John-&amp;gt;&amp;gt;Bob: How about you?
Bob--&amp;gt;&amp;gt;John: Jolly good!
&lt;/code>&lt;/pre>
&lt;p>An example &lt;strong>Gantt diagram&lt;/strong>:&lt;/p>
&lt;pre>&lt;code>```mermaid
gantt
section Section
Completed :done, des1, 2014-01-06,2014-01-08
Active :active, des2, 2014-01-07, 3d
Parallel 1 : des3, after des1, 1d
Parallel 2 : des4, after des1, 1d
Parallel 3 : des5, after des3, 1d
Parallel 4 : des6, after des4, 1d
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-mermaid">gantt
section Section
Completed :done, des1, 2014-01-06,2014-01-08
Active :active, des2, 2014-01-07, 3d
Parallel 1 : des3, after des1, 1d
Parallel 2 : des4, after des1, 1d
Parallel 3 : des5, after des3, 1d
Parallel 4 : des6, after des4, 1d
&lt;/code>&lt;/pre>
&lt;p>An example &lt;strong>class diagram&lt;/strong>:&lt;/p>
&lt;pre>&lt;code>```mermaid
classDiagram
Class01 &amp;lt;|-- AveryLongClass : Cool
&amp;lt;&amp;lt;interface&amp;gt;&amp;gt; Class01
Class09 --&amp;gt; C2 : Where am i?
Class09 --* C3
Class09 --|&amp;gt; Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
&amp;lt;&amp;lt;service&amp;gt;&amp;gt;
int id
size()
}
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-mermaid">classDiagram
Class01 &amp;lt;|-- AveryLongClass : Cool
&amp;lt;&amp;lt;interface&amp;gt;&amp;gt; Class01
Class09 --&amp;gt; C2 : Where am i?
Class09 --* C3
Class09 --|&amp;gt; Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
&amp;lt;&amp;lt;service&amp;gt;&amp;gt;
int id
size()
}
&lt;/code>&lt;/pre>
&lt;p>An example &lt;strong>state diagram&lt;/strong>:&lt;/p>
&lt;pre>&lt;code>```mermaid
stateDiagram
[*] --&amp;gt; Still
Still --&amp;gt; [*]
Still --&amp;gt; Moving
Moving --&amp;gt; Still
Moving --&amp;gt; Crash
Crash --&amp;gt; [*]
```
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;pre>&lt;code class="language-mermaid">stateDiagram
[*] --&amp;gt; Still
Still --&amp;gt; [*]
Still --&amp;gt; Moving
Moving --&amp;gt; Still
Moving --&amp;gt; Crash
Crash --&amp;gt; [*]
&lt;/code>&lt;/pre>
&lt;h3 id="todo-lists">Todo lists&lt;/h3>
&lt;p>You can even write your todo lists in Academic too:&lt;/p>
&lt;pre>&lt;code class="language-markdown">- [x] Write math example
- [x] Write diagram example
- [ ] Do something else
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;ul>
&lt;li>&lt;input checked="" disabled="" type="checkbox"> Write math example&lt;/li>
&lt;li>&lt;input checked="" disabled="" type="checkbox"> Write diagram example&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Do something else&lt;/li>
&lt;/ul>
&lt;h3 id="tables">Tables&lt;/h3>
&lt;p>Represent your data in tables:&lt;/p>
&lt;pre>&lt;code class="language-markdown">| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>First Header&lt;/th>
&lt;th>Second Header&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Content Cell&lt;/td>
&lt;td>Content Cell&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Content Cell&lt;/td>
&lt;td>Content Cell&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="callouts">Callouts&lt;/h3>
&lt;p>Academic supports a &lt;a href="https://wowchemy.com/docs/content/writing-markdown-latex/#callouts" target="_blank" rel="noopener">shortcode for callouts&lt;/a>, also referred to as &lt;em>asides&lt;/em>, &lt;em>hints&lt;/em>, or &lt;em>alerts&lt;/em>. By wrapping a paragraph in &lt;code>{{% callout note %}} ... {{% /callout %}}&lt;/code>, it will render as an aside.&lt;/p>
&lt;pre>&lt;code class="language-markdown">{{% callout note %}}
A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
{{% /callout %}}
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;div class="alert alert-note">
&lt;div>
A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
&lt;/div>
&lt;/div>
&lt;h3 id="spoilers">Spoilers&lt;/h3>
&lt;p>Add a spoiler to a page to reveal text, such as an answer to a question, after a button is clicked.&lt;/p>
&lt;pre>&lt;code class="language-markdown">{{&amp;lt; spoiler text=&amp;quot;Click to view the spoiler&amp;quot; &amp;gt;}}
You found me!
{{&amp;lt; /spoiler &amp;gt;}}
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;div class="spoiler " >
&lt;p>
&lt;a class="btn btn-primary" data-toggle="collapse" href="#spoiler-8" role="button" aria-expanded="false" aria-controls="spoiler-8">
Click to view the spoiler
&lt;/a>
&lt;/p>
&lt;div class="collapse card " id="spoiler-8">
&lt;div class="card-body">
You found me!
&lt;/div>
&lt;/div>
&lt;/div>
&lt;h3 id="icons">Icons&lt;/h3>
&lt;p>Academic enables you to use a wide range of &lt;a href="https://sourcethemes.com/academic/docs/page-builder/#icons" target="_blank" rel="noopener">icons from &lt;em>Font Awesome&lt;/em> and &lt;em>Academicons&lt;/em>&lt;/a> in addition to &lt;a href="https://sourcethemes.com/academic/docs/writing-markdown-latex/#emojis" target="_blank" rel="noopener">emojis&lt;/a>.&lt;/p>
&lt;p>Here are some examples using the &lt;code>icon&lt;/code> shortcode to render icons:&lt;/p>
&lt;pre>&lt;code class="language-markdown">{{&amp;lt; icon name=&amp;quot;terminal&amp;quot; pack=&amp;quot;fas&amp;quot; &amp;gt;}} Terminal
{{&amp;lt; icon name=&amp;quot;python&amp;quot; pack=&amp;quot;fab&amp;quot; &amp;gt;}} Python
{{&amp;lt; icon name=&amp;quot;r-project&amp;quot; pack=&amp;quot;fab&amp;quot; &amp;gt;}} R
&lt;/code>&lt;/pre>
&lt;p>renders as&lt;/p>
&lt;p>
&lt;i class="fas fa-terminal pr-1 fa-fw">&lt;/i> Terminal&lt;br>
&lt;i class="fab fa-python pr-1 fa-fw">&lt;/i> Python&lt;br>
&lt;i class="fab fa-r-project pr-1 fa-fw">&lt;/i> R&lt;/p>
&lt;h3 id="did-you-find-this-page-helpful-consider-sharing-it-">Did you find this page helpful? Consider sharing it 🙌&lt;/h3></description></item><item><title>Display Jupyter Notebooks with Academic</title><link>https://academic-devops.netlify.app/post/jupyter/</link><pubDate>Tue, 05 Feb 2019 00:00:00 +0000</pubDate><guid>https://academic-devops.netlify.app/post/jupyter/</guid><description>&lt;pre>&lt;code class="language-python">from IPython.core.display import Image
Image('https://www.python.org/static/community_logos/python-logo-master-v3-TM-flattened.png')
&lt;/code>&lt;/pre>
&lt;p>&lt;img src="./index_1_0.png" alt="png">&lt;/p>
&lt;pre>&lt;code class="language-python">print(&amp;quot;Welcome to Academic!&amp;quot;)
&lt;/code>&lt;/pre>
&lt;pre>&lt;code>Welcome to Academic!
&lt;/code>&lt;/pre>
&lt;h2 id="install-python-and-jupyterlab">Install Python and JupyterLab&lt;/h2>
&lt;p>&lt;a href="https://www.anaconda.com/distribution/#download-section" target="_blank" rel="noopener">Install Anaconda&lt;/a> which includes Python 3 and JupyterLab.&lt;/p>
&lt;p>Alternatively, install JupyterLab with &lt;code>pip3 install jupyterlab&lt;/code>.&lt;/p>
&lt;h2 id="create-or-upload-a-jupyter-notebook">Create or upload a Jupyter notebook&lt;/h2>
&lt;p>Run the following commands in your Terminal, substituting &lt;code>&amp;lt;MY-WEBSITE-FOLDER&amp;gt;&lt;/code> and &lt;code>&amp;lt;SHORT-POST-TITLE&amp;gt;&lt;/code> with the file path to your Academic website folder and a short title for your blog post (use hyphens instead of spaces), respectively:&lt;/p>
&lt;pre>&lt;code class="language-bash">mkdir -p &amp;lt;MY-WEBSITE-FOLDER&amp;gt;/content/post/&amp;lt;SHORT-POST-TITLE&amp;gt;/
cd &amp;lt;MY-WEBSITE-FOLDER&amp;gt;/content/post/&amp;lt;SHORT-POST-TITLE&amp;gt;/
jupyter lab index.ipynb
&lt;/code>&lt;/pre>
&lt;p>The &lt;code>jupyter&lt;/code> command above will launch the JupyterLab editor, allowing us to add Academic metadata and write the content.&lt;/p>
&lt;h2 id="edit-your-post-metadata">Edit your post metadata&lt;/h2>
&lt;p>The first cell of your Jupter notebook will contain your post metadata (&lt;a href="https://sourcethemes.com/academic/docs/front-matter/" target="_blank" rel="noopener">front matter&lt;/a>).&lt;/p>
&lt;p>In Jupter, choose &lt;em>Markdown&lt;/em> as the type of the first cell and wrap your Academic metadata in three dashes, indicating that it is YAML front matter:&lt;/p>
&lt;pre>&lt;code>---
title: My post's title
date: 2019-09-01
# Put any other Academic metadata here...
---
&lt;/code>&lt;/pre>
&lt;p>Edit the metadata of your post, using the &lt;a href="https://sourcethemes.com/academic/docs/managing-content" target="_blank" rel="noopener">documentation&lt;/a> as a guide to the available options.&lt;/p>
&lt;p>To set a &lt;a href="https://sourcethemes.com/academic/docs/managing-content/#featured-image" target="_blank" rel="noopener">featured image&lt;/a>, place an image named &lt;code>featured&lt;/code> into your post&amp;rsquo;s folder.&lt;/p>
&lt;p>For other tips, such as using math, see the guide on &lt;a href="https://sourcethemes.com/academic/docs/writing-markdown-latex/" target="_blank" rel="noopener">writing content with Academic&lt;/a>.&lt;/p>
&lt;h2 id="convert-notebook-to-markdown">Convert notebook to Markdown&lt;/h2>
&lt;pre>&lt;code class="language-bash">jupyter nbconvert index.ipynb --to markdown --NbConvertApp.output_files_dir=.
&lt;/code>&lt;/pre>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>This post was created with Jupyter. The orginal files can be found at &lt;a href="https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/post/jupyter">https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/post/jupyter&lt;/a>&lt;/p></description></item></channel></rss>