title: How to collapse a Java code cell (made in Jupyter Notebook) on a website with Jekyll blog posts?
body: <p>I have a blogging website using <a href="https://github.com/fastai/fastpages" rel="nofollow noreferrer">fastpages</a>, which allows me to create Jekyll posts, along with posts created with Jupyter Notebook.</p>
  <p>I'm creating a Jupyter Notebook post in VS Code that is using the Java kernel and want to hide a Java code cell.</p>
  <p>The fastpages <a href="https://github.com/fastai/fastpages" rel="nofollow noreferrer">README</a> says that you can hide a code cell with <code>#collapse</code> at the top of the code cell, while its blog <a href="https://lwu1822.github.io/fastpages/java/2022/09/07/w3-if-else.html" rel="nofollow noreferrer">website</a> says that you can use <code>#collapse-hide</code>.</p>
  <p>I tried both of these options on my code cell, but when I run them, it says <code>illegal character: '#'</code></p>
  <p><a href="https://i.stack.imgur.com/kUQwr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kUQwr.png" alt="enter image description here" /></a></p>
  <p>I think the issue might be that <code>#collapse-hide</code> might only work for Python cells, but I'm pretty lost when searching for the problem.</p>
  <p>The Jupyter Notebook <a href="https://jupyterbook.org/en/stable/interactive/hiding.html" rel="nofollow noreferrer">documentation</a> says that you can hide code cells with</p>
  <pre><code>{
      &quot;tags&quot;: [
          &quot;hide-input&quot;,
      ]
  }
  </code></pre>
  <p>but I do not know where to put this metadata in.</p>
  <p>On that page, there is also a link to a <a href="https://jupyterbook.org/en/stable/content/metadata.html#jupyter-cell-tags" rel="nofollow noreferrer">cell tags guide</a>. I tried Step 1 (by clicking <code>View -&gt; Cell Toolbar -&gt; Tags</code>), but after clicking the <code>Tabs</code> button, I do not know what to do. I also tried going to <code> View -&gt; Cell Toolbar -&gt; Edit Metadata</code>, but when I paste the metadata above,  it says <code>Could not save invalid JSON</code></p>
  <p>(by the way, I am using Jupyter Notebook on my localhost now, not VS Code)</p>
  <p><a href="https://i.stack.imgur.com/w2Vwq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w2Vwq.png" alt="enter image description here" /></a></p>
  <p>I tried removing the curly braces from the metadata (because I think the curly braces would be for if I only paste the metadata and there isn't the other stuff (like <code>&quot;vscode&quot;: {...</code>?), but the same error occurs.</p>
  <p><a href="https://i.stack.imgur.com/6M816.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6M816.png" alt="enter image description here" /></a></p>
  <br>
  <p>I don't know how to code in JSON, I would just like to be able to hide my code cell on my website, like this:</p>
  <p><a href="https://i.stack.imgur.com/0bIye.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0bIye.png" alt="enter image description here" /></a></p>
  <p>I do not even know if I am heading in the right direction. Basically, I would like to know: how can I hide my Java code cell?</p>