Google Analytics

Saturday, 3 December 2022

Creating a Jekyll Site

Following the instructions at https://pages.github.com/, I have enabled a HTML website to be published to GitHub Pages using GitHub Desktop.  I have installed Jekyll on an Ubuntu 22.10 VM and now I am going to enable my site with Jekyll.

Using Visual Studio Code I have Cloned my Git Repository to /home/myuser/Workspace/nthomasgsy.github.io.


I am now going to follow the instructions at https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll?platform=linux#creating-your-site.


Step one is to open a terminal window and cd to the folder where my repository has been cloned.


Considering https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site it seems cleaner to publish from a /docs folder on the source branch.  Following step 6 I make a docs folder and change directory to it.


$ mkdir docs

# Creates a new folder called docs

$ cd docs


Step 7 is to run the command to create a Jekyll site in the docs directory:


$ jekyll new --skip-bundle .

# Creates a Jekyll site in the current directory


This has added the following files which are now visible in VS Code:



Following the instructions we are told to comment out the gem "jekyll" line shown here:



Step 10 tells us to uncomment and adjust the gem "github-pages" line.  As I have commented in my code, instead of simply uncommenting the line as as described in the file’s commented instructions, step 10 asks to reference the latest supported version of the github-pages gem from https://pages.github.com/versions/.


At time of writing the version was 227:



Having saved and closed the gemfile.  Back in terminal, step 12 tells us to run bundle install in the docs directory:


$ bundle install


Following step 13, I have adjusted my _config.yml file.  It is not clear whether /docs needs to be specified as the baseurl, so I commented it out.



To run and test locally (step 14), following https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll, it was indeed necessary for me to run:


$ bundle add webrick


I was then able to run:


$ bundle exec jekyll serve


It is then possible to see the site running at http://localhost:4000/


With this all working, I was ready to commit the code.


First, before I was able to commit the code, I had to set my git username and email, (https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup).  Having checked I hadn’t already done so with:


$ git config --list


I then used the following commands to set my git username and email:


$ git config --global user.name "John Doe"

$ git config --global user.email johndoe@example.com


Back in Visual Studio Code I was able to commit the code.



Clicking commit with a comment provided as shown above and then syncing changes:



From the Github repository settings, I then had to change the branch folder to the /docs folder:



With this done, the site was re-published using Jekyll!


Installing Jekyll

Following the instructions at https://pages.github.com/, I have enabled a HTML website to be published to GitHub Pages using GitHub Desktop.  But I want to expand on this with the prescribed use of Jekyll…

Having tried to install Jekyll on Windows Subsystem for Linux via the bash method described at https://jekyllrb.com/docs/installation/windows/, I ran into problems where I could not update the Ruby gems and had errors with directory permissions.  It appeared that the instructions conflicted with the Ruby install on Ubuntu and I ended up blowing away my WSL image.  I should have paid heed to the warning: ‘Bash on Ubuntu on Windows is still under development, so you may run into issues’.


Perhaps the WSL instructions should be supplemented with the Ubuntu instructions: https://jekyllrb.com/docs/installation/ubuntu/.


Instead I am now using the following instructions on an Ubuntu VM running Ubuntu 22.10…


  1. Update repository lists and packages:

sudo apt-get update -y && sudo apt-get upgrade -y


  1. Install Ruby and other pre-requisites:


sudo apt-get install ruby-full build-essential zlib1g-dev



  1. Avoid installing RubyGems packages (called gems) as the root user. Instead, set up a gem installation directory for your user account. The following commands will add environment variables to your ~/.bashrc file to configure the gem installation path:


echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc

echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc

echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc

source ~/.bashrc


  • It is this aspect that is probably missing from the WSL instructions.

  • ‘This tells gem to place its gems within the user’s home folder, not in a system-wide location, and adds the local jekyll command to the user’s PATH ahead of any system-wide paths.


To activate the new exports, either close and restart Bash, logout and log back into your shell account, or run . .bashrc in the currently-running shell’, (https://jekyllrb.com/docs/troubleshooting/#no-sudo).


  1. Next, update your Ruby gems:


gem update


  1. Install Jekyll and gem bundler:


gem install jekyll bundler


Check your Jekyll version:


jekyll -v


For me, this has resulted in Jekyll version 4.3.1 at time of writing.


I am going to follow with https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll?platform=linux#creating-your-site, but using Visual Studio Code instead of terminal where possible.

Wednesday, 18 December 2013

Five Years Later...

So, I haven't posted a blog post for nearly five years.  As might be expected, there have been many technological developments since then...

I last posted when I was doing my BSc in Computing and Internet Technology, at Bournemouth University, back in 2009.  While I was studying my degree, I thought I might write myself a blog that showed some history to the 'Semantic Web' which I was building my degree project around.  As part of this I read a lot about the history of the Web and its creator Tim Berners-Lee, (TimBL), and also of the work of the University of Southampton in establishing a unit to research 'Web Science'.

Unfortunately, my degree project to produce a genealogy application using modern file formats never reached completion.  A classic case of biting off more than I could chew and I still like to think I could bring it out of hibernation.  But my interest in 'Web Science' remained.

When we look back, I think we can see that those users of social media at that stage, (08/09), were 'early adopters'.  We have grown familiar with the likes of Facebook, Twitter, LinkedIn, Instagram etc.  We can now see many examples of the 'digital migrants' or 'baby boomers' also using social media.

I think that 'Web 2.0' was 'Social Media'.  Now we should start looking for the next evolutionary step.

In my work I have since worked with developing the XML 'Web Services' that I wrote about in 2009.  These now feature as part of the standard toolkit for a developer.  I have also begun working with Microsoft's SharePoint, which has come on in leaps and bounds since 2008/9.  Looking back on my posts it might be interesting to contrast them with the approach taken by SharePoint.

Virtualisation has also become a major part of the IT Professional's toolkit, particularly in the form that we call 'the cloud'.  The cloud comes in a few varieties which I shan't discuss right now, (IaaS, PaaS, SaaS).  Cloud computing puts an enormous amount of computing power in our hands.  Yes, it has been around for the past 5 years, used by those social media sites mentioned earlier, but now it is becoming a serious option for the lone worker.

Another major development has been the coming of the MOOCs, or Massive Open Online Courses.  I first became aware of MOOCs from the BBC exposure of EdX.  In addition to the American providers, in Britain we also now have FutureLearn.

FutureLearn recently offered a course from the University of Southampton on 'Web Science', covering the research that they have been undertaking in the past 5 years.  As hinted at above, there have been many developments in web and related technologies and it is the role of Web Science to look at the effects that these developments have on us.

I hope that in the future I can find time to blog about these developments and possible future ones.

Tuesday, 13 December 2011

David Lacey reports on Infosec in Small Businesses

Very good infosec article from David Lacey. BS7799/ISO27001 is widely recognised, but considered too bulky for small business. PCI-DSS is based on ISO27001, is 'lighter' but still companies have trouble.

http://www.computerweekly.com/blogs/david_lacey/2011/12/small_businesses_need_better_s.html

Tuesday, 21 April 2009

Peter Funch Manhatten Street Corners

http://www.kottke.org/09/04/composite-nyc-street-scenes

Peter Funch manipulates photos taken on street corners so that there is a common theme in the passers by:

http://www.v1gallery.com/artist/show/3

Are you paranoid yet?

Prompted by a blog on Schneier's blog I was redirected to:

http://sierracharlie.wordpress.com/2009/04/10/terror/

This may not be of interest, but the alternative version generator is pure comedy gold. It can be found at:

http://jamesholden.net/billboard/

Here are some examples I created:

Wednesday, 25 March 2009

Web Dev Research Presentation

Presentation about Web services developed for my degree's web programming module.
Includes TCP/IP, FTP and HTTP due to assignment requirements: