diff options
author | bt <bt@btxx.org> | 2024-06-08 13:22:19 -0400 |
---|---|---|
committer | bt <bt@btxx.org> | 2024-06-08 13:22:19 -0400 |
commit | dcfb172704f3afb68a30425029ec834be2883274 (patch) | |
tree | 02ac480745db802d7af03f3213a0c568322170e3 /build/jekyll | |
parent | e146f8a64c793c337999ce316b16ebe5fe6f2dab (diff) |
More content porting, on-going markdown changes for lowdown support
Diffstat (limited to 'build/jekyll')
-rw-r--r-- | build/jekyll/index.html | 80 |
1 files changed, 57 insertions, 23 deletions
diff --git a/build/jekyll/index.html b/build/jekyll/index.html index 10cc056..52f302e 100644 --- a/build/jekyll/index.html +++ b/build/jekyll/index.html @@ -1,70 +1,104 @@ <!doctype html> -<html lang="en" id="top"> +<html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Setup Jekyll from Scratch on a New Linux System</title> - <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> - <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> +<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style> </head> <nav> - <a href="#menu">Menu ↓</a> + <a href="#menu">Menu ↓</a> </nav> <main> -<h1>Setup Jekyll from Scratch on a New Linux System</h1> +<h1 id="setup-jekyll-from-scratch-on-a-new-linux-system">Setup Jekyll from Scratch on a New Linux System</h1> + <p>2022-09-19</p> + <p><strong>Special Note:</strong> Credit needs to be given to user <a href="https://stackoverflow.com/users/4974784/achraf-jeday">Achraf JEDAY</a> for putting these instructions together on Stack Overflow (although his comments were targeting an older version of Ruby). This post is more for my own personal notes than anything else.</p> + <p>I find myself constantly running into small issues when trying to setup existing Jekyll projects on new Linux systems. I <em>could</em> use something like Docker, but that just seems so beefy and slow to me. So here is a step-by-step way (and foolproof from my own testing) to get Jekyll running smoothly in no time!</p> -<h2>Figuring out Ruby First</h2> + +<h2 id="figuring-out-ruby-first">Figuring out Ruby First</h2> + <p>The first item of business is removing the default Ruby that ships with most Linux distros:</p> + <pre><code>sudo apt-get remove ruby </code></pre> + <p>Then we check for updates and install everything we need:</p> + <pre><code>sudo apt update sudo apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev </code></pre> + <p>Now we can install <code>rbenv</code> and <code>ruby-build</code>:</p> -<pre><code>curl -sL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash - + +<pre><code>curl -sL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash - </code></pre> + <p>After both of those install, you will want to add those to your system <strong>PATH</strong>:</p> -<h3>Bash</h3> -<pre><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc -echo 'eval "$(rbenv init -)"' >> ~/.bashrc -source ~/.bashrc + +<h3 id="bash">Bash</h3> + +<pre><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc +echo 'eval "$(rbenv init -)"' >> ~/.bashrc +source ~/.bashrc </code></pre> -<h3>ZSH</h3> -<pre><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc -echo 'eval "$(rbenv init -)"' >> ~/.zshrc -source ~/.zshrc + +<h3 id="zsh">ZSH</h3> + +<pre><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc +echo 'eval "$(rbenv init -)"' >> ~/.zshrc +source ~/.zshrc </code></pre> + <p>With that complete, we can now install the version of Ruby we wish to use and set it globally (at this time of writing it is <code>3.1.2</code>):</p> + <pre><code>rbenv install 3.1.2 rbenv global 3.1.2 </code></pre> + <p>And <code>rehash</code> so our changes take:</p> + <pre><code>rbenv rehash </code></pre> + <p>Now you should see the properly set Ruby version when you run the following:</p> + <pre><code>ruby -v </code></pre> -<h2>Getting Ruby Gems</h2> -<p>In case you don't have it installed already, be sure to grab <code>rubygems</code>:</p> + +<h2 id="getting-ruby-gems">Getting Ruby Gems</h2> + +<p>In case you don’t have it installed already, be sure to grab <code>rubygems</code>:</p> + <pre><code>sudo apt install rubygems </code></pre> -<h2>Running Jekyll</h2> -<p>We are almost done! Navigate to your Jekyll project's directory and run:</p> + +<h2 id="running-jekyll">Running Jekyll</h2> + +<p>We are almost done! Navigate to your Jekyll project’s directory and run:</p> + <pre><code>gem install jekyll bundler bundle install </code></pre> -<p>That's it! Now if you run <code>bundle exec jekyll serve</code> you'll find your Jekyll project running locally! Hopefully this helps others when needing to port any Jekyll projects over to a new Linux system. I know it will save me time!</p> -<h2>Alpine Linux on Wayland</h2> + +<p>That’s it! Now if you run <code>bundle exec jekyll serve</code> you’ll find your Jekyll project running locally! Hopefully this helps others when needing to port any Jekyll projects over to a new Linux system. I know it will save me time!</p> + +<h2 id="alpine-linux-on-wayland">Alpine Linux on Wayland</h2> + <p>Save yourself a world of trouble: just use <code>docker</code>. The docker image below (jekyll-serve) works out-of-the-box:</p> -<p><a href="https://github.com/BretFisher/jekyll-serve">https://github.com/BretFisher/jekyll-serve</a></p> + +<p><a href="https://github.com/BretFisher/jekyll-serve">https://github.com/BretFisher/jekyll-serve</a></p> + <p>Then run the following inside your project:</p> -<pre><code>docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve + +<pre><code>docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve </code></pre> <footer role="contentinfo"> <h2>Menu Navigation</h2> |