Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorSheehan1 committed Jul 15, 2018
2 parents 379d712 + ea3877e commit 89a340a
Show file tree
Hide file tree
Showing 197 changed files with 357 additions and 17,352 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Style/RegexpLiteral:
# Enabled: false

Metrics/BlockLength:
Exclude:
- "spec/**/*.rb"
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ before_script:

script:
- bundle exec rspec
- bundle exec rubocop
23 changes: 12 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
ruby ">= 2.3.0"
# frozen_string_literal: true

ruby '>= 2.3.0'

source 'https://rubygems.org'

group :development, :test do
# gem 'bootstrap-sass', '~> 3.3.7'
gem "jekyll-paginate"
gem "rack-jekyll"
gem "pry"
gem 'pry'
gem 'rack-jekyll'
gem 'rubocop', '~> 0.57.2'
end

group :test do
gem "rspec"
gem "capybara"
gem "faraday"
gem "selenium-webdriver"
gem "chromedriver-helper"
gem 'capybara'
gem 'chromedriver-helper'
gem 'faraday'
gem 'rspec'
gem 'selenium-webdriver'
end

group :jekyll_plugins do
gem 'github-pages'
gem "jekyll-paginate"
gem 'jekyll-paginate'
end
17 changes: 17 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0)
archive-zip (0.7.0)
io-like (~> 0.3.0)
ast (2.4.0)
capybara (2.17.0)
addressable
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -96,6 +97,7 @@ GEM
i18n (0.9.1)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jaro_winkler (1.5.1)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
Expand Down Expand Up @@ -219,8 +221,12 @@ GEM
mini_portile2 (~> 2.3.0)
octokit (4.8.0)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
powerpack (0.1.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
Expand All @@ -232,6 +238,7 @@ GEM
rack (~> 1.5)
rack-test (0.8.2)
rack (>= 1.0, < 3)
rainbow (3.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
Expand All @@ -249,8 +256,17 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.57.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-enum (0.7.1)
i18n
ruby-progressbar (1.9.0)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sass (3.5.6)
Expand Down Expand Up @@ -287,6 +303,7 @@ DEPENDENCIES
pry
rack-jekyll
rspec
rubocop (~> 0.57.2)
selenium-webdriver

RUBY VERSION
Expand Down
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
## Local setup
1. install dependencies
```
bundle
bundle install
```
1. run server
```
bundle exec jekyll serve
```
Currently _config.yml is only loded on the initial jekyll serve command.
If you change config, restart the jekyll server to read the updated data.
You may need to run ```bundle update``` to get the latest version of jekyll used by live github pages.
https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/
Expand All @@ -19,16 +23,37 @@ https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-
https://github.com/bry4n/rack-jekyll/issues/8
1. **Run**
```
# all
bundle exec rspec
# feature tests
bundle exec rspec --tag type:feature
# data tests (for links etc)
bundle exec rspec --tag type:data
```
## Configuration
1. All pages should use the default layout or a layout which inherits from the default layout.
This is because the default layout loads all css/js required by pages.
1. Lightbox.min.css is customized to look for images in /images/lightbox/ instead of /images/
1. Pagination only works from index.html pages, hence the need for projects/index.html
1. For jekyll plugins on github pages, the plugin must be included in both _config.yml and Gemfile
1. Pagination only works from index.html pages, hence the need for projects/index.html.
1. For jekyll plugins on github pages, the plugin must be included in both _config.yml -and Gemfile.
## project structure
1. ```_data/```contains custom data accessable by jekyll e.g. urls, image paths, etc.
1. ```_includes/``` contains partials which can be included in templates.
1. ```_layouts/``` contains html templates which can be reused in multiple pages.
1. ```_posts/``` actually contains projects, in markdown format.
This is to take advantage of jekylls project pagination plugin.
It also means projects must include a date in their file name to be a valid post.
1. ```_site/``` contains the compiled static pages jekyll renders.
1. ```assets/``` contains css, js, images, and third party plugins e.g. lightbox, jstree etc.
1. ```projects/``` contains the html template for rendering the projects home page.
1. ```scripts/``` contains ruby scripts.
1. ```spec/``` contains rspec selenium tests.
## Credit
Expand Down
4 changes: 0 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ plugins:
paginate: 3
paginate_path: "/projects/page:num/"

sass:
sass_dir: "_sass/bootstrap-sass-3.3.7/assets/stylesheets"
style: :compressed

exclude:
- README.md
- LICENSE.md
Expand Down
11 changes: 11 additions & 0 deletions _data/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# work
nli: https://www.nli.ie
ucd: https://www.cs.ucd.ie/

# social
github: https://github.com/ConorSheehan1
linkedin: https://www.linkedin.com/in/conor-s-403358106/
stackoverflow: https://stackoverflow.com/users/6305204/con?tab=profile

# credit
theme: https://twitter.com/michigangraham
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="footer">
<a href="https://twitter.com/michigangraham">
<a href="{{ site.data.links.theme }}">
<p class="text-tuncate">Theme by mattgraham</p>
</a>
</div>
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="header">
<div class="container">
<div class="col">
<a href="https://github.com/ConorSheehan1">
<a href="{{ site.data.links.github }}">
<div class="header-icon">
<img src="{{ '/assets/images/icons/github.svg' | relative_url }}" />
</div>
Expand All @@ -10,7 +10,7 @@
</div>

<div class="col">
<a href="https://www.linkedin.com/in/conor-s-403358106/">
<a href="{{ site.data.links.linkedin }}">
<div class="header-icon">
<img src="{{ '/assets/images/icons/linkedin.svg' | relative_url }}" />
</div>
Expand All @@ -19,7 +19,7 @@
</div>

<div class="col">
<a href="https://stackoverflow.com/users/6305204/con?tab=profile">
<a href="{{ site.data.links.stackoverflow }}">
<div class="header-icon">
<img src="{{ '/assets/images/icons/stackoverflow.svg' | relative_url }}" />
</div>
Expand Down
8 changes: 5 additions & 3 deletions _includes/projects_menu.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div class="header-center">
<input type="text" class="form-control header-left" placeholder="Search projects .." id="projects-search">
<!-- <span class="input-group-btn">
<button class="btn btn-default" type="button" id="btn-search">Go!</button>
</span> -->
{% comment %}
<!-- <span class="input-group-btn">
<button class="btn btn-default" type="button" id="btn-search">Go!</button>
</span> -->
{% endcomment %}

<div id="projects_tree" class="header-right">
<ul>
Expand Down
6 changes: 3 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---

<h1>{{ page.title }}
<span class="back-to">
<span class="back-to-projects">
<a href="{{'/projects' | relative_url }}">&larr; Back to projects</a>
</span>
</h1>
Expand All @@ -12,8 +12,8 @@ <h1>{{ page.title }}
{{content}}

<ul>
<li><a href="{{ page.live }}">View Site</a></li>
<li><a href="{{ page.src }}">View Source Code</a></li>
<li id='live-site-link'><a href="{{ page.live }}">View Site</a></li>
<li id='source-code-link'><a href="{{ page.src }}">View Source Code</a></li>
</ul>

<div id="images">
Expand Down
2 changes: 1 addition & 1 deletion _posts/2018-05-28-vufind.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ live: https://vufind.org/vufind/

VuFind is a library resource portal designed and developed for libraries by libraries.

As part of my work at the [NLI](https://www.nli.ie) I needed to make a small change to the codebase.
As part of my work at the [NLI]({{site.data.links.nli}}) I needed to make a small change to the codebase.
Demian, the core maintainer, ported it to two major releases.
[https://github.com/vufind-org/vufind/pull/1185](https://github.com/vufind-org/vufind/pull/1185).
You can see my commits
Expand Down
20 changes: 0 additions & 20 deletions _sass/bootstrap-sass-3.3.7/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions _sass/bootstrap-sass-3.3.7/.travis.yml

This file was deleted.

Loading

0 comments on commit 89a340a

Please sign in to comment.