Skip to content

Commit e4d85c0

Browse files
committed
chore: addition of things
1 parent ae7b6b4 commit e4d85c0

17 files changed

+948
-78
lines changed

.github/workflows/github-pages.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build and deploy Jekyll site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- f-in-around-new-site
7+
8+
jobs:
9+
github-pages:
10+
runs-on: ubuntu-16.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: helaili/[email protected]
14+
env:
15+
JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ gem "minima", "~> 2.0"
2020
# If you have any plugins, put them here!
2121
group :jekyll_plugins do
2222
gem "jekyll-feed", "~> 0.6"
23+
gem 'jekyll-asciidoc'
2324
gem 'jekyll-paginate-v2'
25+
gem 'jekyll-archives'
2426
end
2527

2628
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ GEM
33
specs:
44
addressable (2.7.0)
55
public_suffix (>= 2.0.2, < 5.0)
6+
asciidoctor (2.0.10)
67
colorator (1.1.0)
7-
concurrent-ruby (1.1.6)
8+
concurrent-ruby (1.1.7)
89
em-websocket (0.5.1)
910
eventmachine (>= 0.12.9)
1011
http_parser.rb (~> 0.6.0)
@@ -27,6 +28,11 @@ GEM
2728
pathutil (~> 0.9)
2829
rouge (>= 1.7, < 4)
2930
safe_yaml (~> 1.0)
31+
jekyll-archives (2.2.1)
32+
jekyll (>= 3.6, < 5.0)
33+
jekyll-asciidoc (3.0.0)
34+
asciidoctor (>= 1.5.0)
35+
jekyll (>= 3.0.0)
3036
jekyll-feed (0.15.0)
3137
jekyll (>= 3.7, < 5.0)
3238
jekyll-paginate-v2 (3.0.0)
@@ -53,7 +59,7 @@ GEM
5359
rb-fsevent (0.10.4)
5460
rb-inotify (0.10.1)
5561
ffi (~> 1.0)
56-
rouge (3.21.0)
62+
rouge (3.22.0)
5763
safe_yaml (1.0.5)
5864
sass (3.7.4)
5965
sass-listen (~> 4.0.0)
@@ -66,10 +72,12 @@ PLATFORMS
6672

6773
DEPENDENCIES
6874
jekyll (~> 3.8.3)
75+
jekyll-archives
76+
jekyll-asciidoc
6977
jekyll-feed (~> 0.6)
7078
jekyll-paginate-v2
7179
minima (~> 2.0)
7280
tzinfo-data
7381

7482
BUNDLED WITH
75-
1.17.2
83+
2.1.4

_data/authors.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
lholmquist:
22
name: "Lucas Holmquist"
33
4+
emailhash: 4120ab1fe80040d03eb790c2efafadc9
45
job_title: "Sr. Software Engineer"
56
twitter: "sienaluke"
67
bio: "Sr. Software Engineer at Red Hat. Red Hat Runtimes Node.js Lead"

_includes/blog/blog-feed.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% for post in paginator.posts %}
44
{% assign author = site.data.authors[post.author] %}
55
<div class="blog-list-item grid-wrapper">
6-
<div class="post-date grid__item width-12-12">{{ post.date | date: '%B %d, %Y' }}
6+
<div class="post-date grid__item width-12-12">{{ post.date | date: '%B %d, %Y' }}
77
{% for tag in post.tags %}<a href="{{site.baseurl}}/blog/tag/{{tag}}">#{{ tag}}</a> {% endfor %}
88
</div>
99
<div class="post-title grid__item width-12-12">
@@ -37,7 +37,7 @@
3737
</div>
3838
{% endif %}
3939
</div>
40-
40+
4141
<div class="grid__item width-2-12">
4242
{% assign tag_words = site.tags | sort %}
4343
{% for stats in tag_words %}

_includes/blog/blog-titleband.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ <h1 class="title text-caps">{{ page.title }}</h1>
99
</div>
1010
</div>
1111
</div>
12-
</div>
12+
</div>

_includes/site-header.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width">
66
<meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
7+
{% if page.cannonical_url %}
8+
<link rel="cannonical" href="{{ page.cannonical_url }}">
9+
{% endif %}
710
<link rel="shortcut icon" type="image/png" href="{{ "/favicon.ico" | prepend: site.baseurl }}" >
811
<link rel="stylesheet" href="{{ 'assets/css/main.css' | relative_url }}" />
912
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">

_posts/2018-04-16-zero-to-express.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,48 @@ layout: post
33
title: "Zero to Express on OpenShift in Three Commands"
44
date: 2018-04-16
55
categories: Openshift Nodeshift
6+
cannonical_url: https://developers.redhat.com/blog/2018/04/16/zero-express-openshift-3-commands/
67
author: lholmquist
78
---
89

9-
<strong>(Edit: November 22, 2019) The Node images used in this post, both community <code>centos7</code> and <code>product</code>, are no longer being updated and maintained. For community images, please use the Universal Base Image (UBI)-based node images located here: <a href="http://registry.access.redhat.com/ubi8/nodejs-10">registry.access.redhat.com/ubi8/nodejs-10</a></strong>
10-
11-
<strong>For a fully supported Product version of Node.js, please check out the Red Hat Software Collections Node.js image, <a href="https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/nodejs-10-rhel7">RH SCL Node.js</a>.</strong>
12-
1310
With the recent <a href="https://developers.redhat.com/blog/2018/03/12/rhoar-nodejs-annoucement/" target="_blank" rel="noopener noreferrer">announcement that Node.js is generally available as part of Red Hat OpenShift Application Runtimes,</a> I wanted to see how easy it was to deploy an <a href="https://expressjs.com/">Express.js</a> app on OpenShift.
1411
<h3>Getting Started</h3>
1512
Before we start, there are some required prerequisites. You need to have <a href="https://nodejs.org" target="_blank" rel="noopener noreferrer">Node 8.x</a> and <a href="https://www.npmjs.com/" target="_blank" rel="noopener noreferrer">npm 5.2 </a> or greater installed. npm comes with the official node distribution, so if you install Node from <a href="https://nodejs.org" target="_blank" rel="noopener noreferrer">Nodejs.org</a>, you should be good.
1613

1714
You'll also need access to an OpenShift environment or the Red Hat Container Development Kit (CDK) minishift environment. For this example, I'll be using minishift. You can find instructions on getting minishift up and running <a href="https://developers.redhat.com/products/cdk/hello-world/" target="_blank" rel="noopener noreferrer">here</a>. For my local minishift, I start it with this command:
18-
<pre>$ minishift start --memory=6144 --vm-driver virtualbox</pre>
15+
16+
`$ minishift start --memory=6144 --vm-driver virtualbox`
17+
1918
You also need to be logged in to whatever OpenShift cluster you are using (OpenShift or minishift) using <code>oc login</code>.
2019
<h3>Spoiler Alert</h3>
2120
For those who don't want to read the whole post and don't want to scroll to the end, here are the three commands that need to be run:
22-
<pre>$ npx express-generator .</pre>
23-
<pre>$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'</pre>
24-
<pre>$ npx nodeshift --strictSSL=false --expose</pre>
21+
22+
`$ npx express-generator . `
23+
24+
`$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'`
25+
26+
`$ npx nodeshift --strictSSL=false --expose`
27+
2528
<h3>Generate an Express App</h3>
2629
What is Express, you say? Well, according to the <a href="https://expressjs.com/" target="_blank" rel="noopener noreferrer">Express website</a>, Express is a "Fast, unopinionated, minimalist web framework for Node.js."
2730

2831
One pretty cool thing about Express is the <i>Express application generator tool</i>: <code>express-generator</code>. This is a command-line tool that <a href="https://expressjs.com/en/starter/generator.html">"quickly creates an application skeleton"</a>. But wait: didn't I just say that Express was unopinionated? It is, but this is the opinionated skeleton creator. ¯_(ツ)_
2932

3033
The Express website recommends installing the <code>express-generator</code> module globally, like this:
31-
<pre>npm install -g express-generator</pre>
34+
35+
`npm install -g express-generator`
36+
3237
But we aren't going to do that. Instead, we are going to use a fairly new feature from npm, called <code>npx</code>.
3338

3439
<code>npx</code> gives us the ability to run one-off commands with out having to install things globally. There is more to <code>npx</code> that just that feature, so if you are interested in all the cool things <code>npx</code> can do, check it out <a href="https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b">here</a>.
3540

3641
With this new-found knowledge, we can now generate our Express app like this:
37-
<pre>$ npx express-generator .</pre>
42+
43+
`$ npx express-generator .`
44+
3845
Let's take a quick look at what is actually happening with this command. First, <code>npx</code> sees that we want to run the <code>express-generator</code> command, so <code>npx</code> does some magic to see if we have it installed locally (in our current directory), and then it checks our global modules. Because it is not there, it downloads it for this one-time use.
3946

40-
<code>express-generator</code> is run in our current directory, which is denoted by that <strong>.</strong> at the end of the command.
47+
<code>express-generator</code> is run in our current directory, which is denoted by that **.** at the end of the command.
4148

4249
The result should look something like this:
4350

@@ -50,7 +57,9 @@ Now that we created our basic Express application using one command, we need to
5057
We need to pass a <code>PORT</code> environment variable to our start script.
5158

5259
One way to do this is to open a text editor and do it that way, but that would add a few more steps. To do this in one command, we can use the <a href="https://www.npmjs.com/package/json" target="_blank" rel="noopener noreferrer">json module</a>.
53-
<pre>$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'</pre>
60+
61+
`$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'`
62+
5463
As before, we are using the <code>npx</code> command to allow us to not have to install the <code>json</code> module globally.
5564

5665
Let's see what is going on with the options passed to the <code>json</code> module.
@@ -60,7 +69,9 @@ Let's see what is going on with the options passed to the <code>json</code> modu
6069
For more information on the <code>json</code> module, check out the <a href="http://trentm.com/json/">documentation</a>.
6170
<h3>Deploy the Application to OpenShift</h3>
6271
And now, the final step is to run this command:
63-
<pre>$ npx nodeshift --strictSSL=false --expose</pre>
72+
73+
`$ npx nodeshift --strictSSL=false --expose`
74+
6475
Here, we are using the <a href="https://www.npmjs.com/package/nodeshift" target="_blank" rel="noopener noreferrer">nodeshift module</a> to deploy our application. <code>nodeshift</code> is a CLI or programmable API that helps with deploying Node apps to OpenShift.
6576

6677
<code>npx</code> is doing the same thing as in the previous examples.
@@ -81,15 +92,25 @@ Then, if we click the link, we can see our example app running:
8192

8293
<img class="alignnone size-full wp-image-475737" src="https://developers.redhat.com/blog/wp-content/uploads/2018/03/express-quick-example-express.png" alt="" />
8394

84-
<strong>Note:</strong> The example above will use the latest <a href="https://hub.docker.com/r/bucharestgold/centos7-s2i-nodejs/">community s2i images</a> (9.x at the time of this writing). To use a fully supported version of Node.js on OpenShift all you need is to add the "--dockerImage" flag.
95+
__Note:__ The example above will use the latest <a href="https://hub.docker.com/r/bucharestgold/centos7-s2i-nodejs/">community s2i images</a> (9.x at the time of this writing). To use a fully supported version of Node.js on OpenShift all you need is to add the "--dockerImage" flag.
8596

8697
This will integrate the Red Hat OpenShift Application Runtime version Node.js (8.x) which you can get full production and developer support as part of our product subscription.
8798

8899
This might look something like this:
89-
<pre>$ npx nodeshift --strictSSL=false --expose --dockerImage=registry.access.redhat.com/rhoar-nodejs/nodejs-8</pre>
100+
101+
`$ npx nodeshift --strictSSL=false --expose --dockerImage=registry.access.redhat.com/rhoar-nodejs/nodejs-8`
102+
90103
<h3>Recap</h3>
91104
In this post, the commands were a little spread out, so let's see them all together again:
92-
<pre>$ npx express-generator .</pre>
93-
<pre>$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'</pre>
94-
<pre>$ npx nodeshift --strictSSL=false --expose</pre>
105+
106+
`$ npx express-generator .`
107+
108+
`$ npx json -I -f package.json -e 'this.scripts.start="PORT=8080 node ./bin/www"'`
109+
110+
`$ npx nodeshift --strictSSL=false --expose`
111+
95112
The example app we created was very simple, but it shows how quickly you can get started using Node.js on OpenShift.
113+
114+
_(Edit: November 22, 2019) The Node images used in this post, both community centos7 and product, are no longer being updated and maintained. For community images, please use the Universal Base Image (UBI)-based node images located here: <a href="http://registry.access.redhat.com/ubi8/nodejs-10">registry.access.redhat.com/ubi8/nodejs-10</a>_
115+
116+
_For a fully supported Product version of Node.js, please check out the Red Hat Software Collections Node.js image, <a href="https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/nodejs-10-rhel7">RH SCL Node.js</a>._

_posts/2018-10-03-welcome-to-jekyll-copy.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

_posts/2018-10-03-welcome-to-jekyll.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)