This website is a static site dedicated to the Dominion League. The site is generated using Jekyll, which is a static site generator.
This was last updated by: truffles
on 2020-06-01
- How the repository is organized
- Main Directory
/_posts
Subdirectory/_data
Subdirectory/img
Subdirectory/_layouts
Subdirectory/_includes
Subdirectory
- How to edit/write a post/newsletter
- How to update a page (eg. sign-ups, rules, FAQ)
- How to change/add/remove a moderator
- (Devs) Development Set-Up Instructions
- (Devs) Why use Jekyll?
- (Devs) Editing the design of the website
- The main directory contains all the main pages found in the navigation bar (anything ending in
.html
or.markdown
represents a page on the website)index.html
(Home page)sign-ups.html
(Sign-ups)matches.html
(Matches)- etc.
- Other files in the main directory are used to generate the site, and are not important (eg.
Gemfile
)
- This contains all newsletters/sign-ups/update posts made by the league. All the files are written in
YYYY-MM-DD-<Title_of_article>.markdown
. Any markdown syntax (ie. bolding/headings) will be converted automatically to the same syntax in the physical site page.
- This contains all images used on the site. The images are organized into its relevant category (eg.
/moderators
contains all pictures of the moderators)
- This contains all overall "information" and "settings" of the site (ie. the moderators, the template settings, etc.) to be used by pages and must be in
.yml
format.moderators.yml
- Contains a list of moderators and information regarding name, discord handle, etc. to be used. Eg.
- name: truffles discord: truffles#9374 description: truffles likes truffles image: truffles
nav.yml
- Contains the pages to be generated in the navigation bar. Eg.
- name: About path: rules.html section_id: about children: - name: Rules path: rules.html - name: F.A.Q. path: faq.html - name: Matches ...
template.yml
- Contains the template settings to be used across the site, including font, colors etc.
- This contains all types of layouts you can use throughout the site. Eg.
default, newsletters, post...
. You can specify how a page looks by indicatinglayout = default
at the top of each.html
or.markdown
.- Ex. All the posts in
/_posts
havelayout = post
at the top.
- Ex. All the posts in
- This contains all the things that can be included in each page of the site. For example, the
header.html
,footer.html
,sidebar.html
etc.
- Copy the template post
1000-01-01-DEFAULT_TEMPLATE.markdown
inside the/_posts
subdirectory - Edit the file name so it matches the template
YYYY-MM-DD-NEWSLETTER_TITLE.markdown
, separating words in the title with_
underscores. - Fill in the fields and write your post. It will automatically generate this page in newsletters.
- Navigate to
/posts/YYYY-MM-DD-Sign-ups.markdown
- Edit the document with the content you want change. CHANGE THE DATE OF THE FILE
- Eg. if today is 2020/05/20, the file should be renamed
/2020/05/20-Sign-ups.markdown
- Navigate to
sign-ups.html
- Edit the
<iframes....>
Google Sheets embeddings with the ones for the new season.
- Navigate to the appropriate document. (eg.
rules.markdown
) - Modify it.
- Save and you're done!
Change/remove/add moderator details
- Navigate to
_data/moderators.yml
. - Add/remove/change the moderator with the right information. (Instructions are provided at the top) Eg.
- name: Lemonspawn
discord: Lemonspawn#2571
description:
image: lemonspawn
Change/remove/add moderator picture
- Navigate to the
/img/moderators/
directory. Replace/add your picture in
- Note: It must be in .png`
- Note 2: The suffix (
suffix.png
) should match what is provided inmoderators.yml
as per instructions inHow to change/remove/add a moderator.
To run and test the site locally
- Install Jekyll using the instructions here.
- Install Ruby using the instructions here
- Install Bundler using the instructions here
- In your terminal in the project's folder, run
bundle exec jekyll serve
.- It will provide you with a port to launch your site locally
- It is able to generate static pages, which increases the simplicity. For example, it is able to take markdown pages and generate complete pages.
- This means that moderators with limited dev experience, can contribute to the site with only knowing markdown.
- Jekyll has built in design control, meaning that it is easy to make a few templates and use pre-created templates for multiple pages.
- Can be used with Github, which means that we don't need to pay for hosting (as you can host it on Github!)
- All layout templates are found inside
_layouts.html
- Each page in the site (eg.
index.html
) contains an information header at the top, which specifies what type of layout the page will use.--- layout: default_index ---
- Navigate to the
/_layouts.html
subdirectory and directly edit templates there. - Layout templates may 'include' certain shared elements (such as a navigation bar), which are found in the
/_includes
subdirectory.
- Edit directly in the page (eg.
site.html
)
style.css
is located in/_includes/css/style.css
- Overall font/colors is located in
/_data/template.yml