title: Make sub-string of string bold which is populated from jekyll variable
body: <p>On my page I would like part of a string to be bold, however the string value is created from a Jekyll variable. Effectively, I want to pre-process the string with some function where the jekyll variable is the input.</p>
  <p>In my main html file I have:</p>
  <pre><code>{% for post in site.posts %}
    {% include archive.html %}
  {% endfor %}
  </code></pre>
  <p>Inside <code>archive.html</code> I have:</p>
  <pre><code>&lt;p&gt; {{ post.var }} &lt;/p&gt;
  </code></pre>
  <p>I'm assuming javascript is the way to go about this using a function along the lines of:</p>
  <pre><code>function makeSubStrBold(str) {
    var substr = &quot;something&quot;
    var strRegExp = new RegExp(substr, 'g');
    return str.replace(strRegExp, '&lt;b&gt;'+substr+'&lt;/b&gt;');
  }
  </code></pre>
  <p>So if <code>post.var = &quot;this is something&quot;</code>, what gets actually displayed in html is <code>&quot;this is &lt;b&gt; something &lt;/b&gt;&quot;</code></p>
  <p>How could I use this javascript function to pre-process the string from the jekyll variable? Is this maybe possible in css?</p>