This is the code repository containing Javagruppens website.
The website is based on Jekyll, and is automatically re-generated / deployed by Github (Github Pages). Whenever a page is committed, a new build is produced and deployed to javagruppen.dk. Do however notice that a cap of a maximum of 10 builds per hours does exist.
To develop on / contribute to Javagruppens website, we recommend that you use one of the following approaches
This section contains information on setting up a development environment locally on your own machine
Please read: (https://jekyllrb.com/docs/windows/)
Download: (https://rubyinstaller.org/downloads/)
gem install bundle
gem install jekyll
bundle install
bundle exec jekyll serve
bundle update github-pages
Please read: (https://stackoverflow.com/questions/39381360/how-do-i-install-ruby-gems-on-mac)
or follow (the condensed command-set below):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install rbenv ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
rbenv install 2.3.3
rbenv local 2.3.3
rbenv global 2.3.3
rbenv rehash
gem update --system
gem install bundle
gem install jekyll
bundle install
bundle exec jekyll serve
To configure WebStorm for Jekyll development, read the following blog post by Hadi Hariri:
(http://hadihariri.com/2014/01/04/using-webstorm-to-maintain-a-jekyll-site/)
This section contains information on developing through a docker-based setup, by:
- Make sure Docker (and docker-compose) is properly installed on your machine
- Clone the repository
- Go into the cloned repository
- Start the jekyll bundler (through docker)
docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve
See: bash_docker.sh
Here's a description of "what goes where", in regards to posts, pages etc.:
** TO BE WRITTEN! **
Pages must be placed in a sub-folder within the pages
-folder, with an appropriate name. The file within that folder must then be named index.md
, if the page contains
one or more sub pages, these can be added to the same sub-folder, with a descriptive name.
The following example illustrates the layout for a contact-page, with address- and form-sub pages, eg.:
/pages
/contact
index.md
address.md
form.md
The Front Matter of the pages "posts" can contain quite a few entries, to customize a few aspects of their appearance, these beingø;:
layout
controls the layout of the page in question (this is required normally this will be set topage
, eg:layout: page
- unless catering to special concerns)title
sets the title of the page (and is required)permalink
specifies the URL path to the page (this may be omitted, or must contain an URL path, eg.:/example/
making it accessible onhttp://javagruppen.dk/example/
)feature-img
sets the banner image on the page (containing the title of the page)tags
sets a list (array) of tags to categorize the page under (must be an array, eg.:[Test, Eaxmple, Other]
)order
the sort order of the menu-item (linking to the page from the main navigation, must be an positive integer)hide
specifies if the page should appear in the main navigation (used for hiding sub-pages, eg.:hide: true
)
Emails must be placed in the folder _emails
, in the appropriate year-folder, and named on the form YYYY-MM-DD-description.md
, where YYYY
is replaced with a 4
digits year, MM
with a two digit month and DD
with a two digit "day of month".
Eg. a mail correspondence (newsletter) from April 1st 2018, must go into the _emails/2018
-folder, and file must be named 2018-04-01-some-description.md
(where the description
in this case is some description
).
The Front Matter of the e-mail "posts" must contain two entries:
layout
controls the layout of the emails posts (and this must be set to email, eg:layout: email
)subject
(being the subject line used in the e-mail)
Term | Description |
---|---|
Front Matter | The first lines of the various posts / pages, containing meta-data about the content (partitioned by 3 dashes --- ) |