You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Updating an existing page](#updating-an-existing-page)
18
+
-[Adding a page (example)](#adding-a-page-example)
17
19
-[Updating side nav links](#updating-side-nav-links)
18
-
-[Testing locally](#testing-locally)
20
+
-[Updating the styling ](#updating-the-styling)
19
21
-[Original Author](#original-author)
20
22
-[License](#license)
21
23
22
-
## Contents
23
24
24
-
###Directory organization
25
+
## Directory organization of Repo
25
26
26
27
(only highlighting folders and files relevant to updating site)
27
28
@@ -49,99 +50,118 @@ Included are instructions for how to update the team website with a focus on the
49
50
50
51
```
51
52
52
-
- Main takeaway: To update the contents of the website you will only need to add/remove/update markdown files in the main directory.
53
53
54
-
- To incorporate images or any other files into the site please put them in `/public/assets/`
55
-
56
-
- Extra: Updates to formating is done in the 3 directories: `/_includes/``/_layouts/` and `/_public/`
54
+
## MUST READ - how jekyll works
57
55
58
-
### Home page (default) vs. all other pages
59
-
60
-
- How jekyll knows to work its magic on a markdown or html file is based on the file's [YAML front matter block](https://jekyllrb.com/docs/front-matter/).
56
+
1. How jekyll knows to work its magic on a markdown or html file is based on the file's [YAML front matter block](https://jekyllrb.com/docs/front-matter/).
61
57
62
-
- no front matter = not included in the website (e.g., this readme)
63
-
64
-
- Currently, there are 2 page layouts (templates) used in our site:
65
-
-`/_layouts/default.html`
66
-
-`/_layouts/page.html`
67
-
68
-
- The way that they are merged with the markdown files is via the front matter:
58
+
e.g.,
59
+
```
60
+
---
61
+
layout: page
62
+
title: About
63
+
permalink: /about/
64
+
---
65
+
```
66
+
-**no front matter = not included in the website** (e.g., jekyll knows not to include this README.md you are reading because there is no front matter)
69
67
70
-
```
71
-
---
72
-
layout: page
73
-
title: About
74
-
permalink: /about/
75
-
---
76
-
```
77
-
78
-
-`layout: default` should only be used for the home page because it has some additional formatting + appears as the first option in the top menu bar
68
+
2. Main takeaway: To update the **contents of the website** you will only need to add/remove/update the markdown files with front matter in the main directory. (e.g., [3people.md](3people.md)) More instructions in [Updating website content](#updating-website-content).
79
69
80
-
>From the Hyde repo: "**Why require a specific layout?** Jekyll will return *all* pages, including the `atom.xml`, and with an alphabetical sort order. To ensure the first link is *Home*, we exclude the `index.md` page from this list by specifying the `default` layout."
70
+
-**Do not alter the files in `_includes`, `_layouts` for now.**
81
71
82
-
-`layout: page` is used for all other pages you want included in the site. More instructions for adding a new page below.
83
72
84
-
#### Adding a page (example)
73
+
#### Home page (default) vs. all other pages
85
74
86
-
Let's say you want to add a 'Contact' page and it should appear as the last option on the top menu bar
87
-
88
-
- create a markdown file in the main directory
75
+
- How jekyll knows to work its magic on a markdown or html file is based on the file's [YAML front matter block](https://jekyllrb.com/docs/front-matter/).
89
76
90
-
- since 'page.html' pages are sorted alphabetically, if you want the Contact page to be last in the menu prefix the markdown filename with a '9' or 'z' for example
77
+
- Currently, there are 2 page layouts (templates) used in our site:
78
+
-`default` via */_layouts/default.html*
79
+
-`page` via */_layouts/page.html`*
91
80
92
-
- in the markdown file, the front matter should look like this:
81
+
- The way that the styling is merged with the markdown files is via `layout` in the front matter:
82
+
e.g.,
83
+
```
84
+
---
85
+
layout: page
86
+
title: About
87
+
permalink: /about/
88
+
---
89
+
```
90
+
-`layout: page` is to be used for almost all of the pages you want included in the site
91
+
-`layout: default` is only used for the home page [index.md](index.md) because it has some additional formatting + appears as the first option in the top menu bar
92
+
>From the Hyde repo: "**Why require a specific layout?** Jekyll will return *all* pages, including the `atom.xml`, and with an alphabetical sort order. To ensure the first link is *Home*, we exclude the `index.md` page from this list by specifying the `default` layout."
93
+
94
+
95
+
## Updating website content
96
+
97
+
- To update the contents of the website you will only need to add/remove/update markdown files in the main directory.
98
+
- To incorporate images or any other files into the site please put them in `/public/assets/`
93
99
94
-
```
95
-
---
96
-
layout: page
97
-
title: Contact
98
-
permalink: /contact/
99
-
---
100
-
```
101
-
- the layout should be 'page', to tell jekyll to use the page.html layout
102
-
- the title is what will be used in the top menu bar
103
-
- assigning a permalink will overwrite the default of using the filename (e.g., *https:// ... io/9contact/*:thumbsdown:)
104
-
105
-
- underneath the front matter include whatever content you would like
106
-
107
-
- you can add formatting to the file using markdown or html syntax
100
+
#### (OPTIONAL) Previewing changes locally
101
+
If you want to test/preview the site locally as you make changes
108
102
109
-
- when done save and push changes, jekyll will take care of the rest
5. To preview your changes don't forget to save your file and refresh the browser.
110
108
111
109
#### Updating an existing page
112
110
113
-
- In the main directory, open the markdown file
114
-
- make whatever changes to the content you want
115
-
- save it and push changes
111
+
1. Clone this repository
112
+
2. Create a branch from the 'master' branch of THIS repository (not the poole/hyde one)
113
+
3. In the main directory, open the markdown file you want to update e.g. [3people.md](3people.md)
114
+
4. make whatever changes to the content you want
115
+
5. save the file
116
+
6. push the changes to your branch
117
+
7. Make a pull request for your branch into the **MoNA's `Master` branch** (:warning: NOT poole/hyde) then jekyll will take care of the rest
116
118
117
119
(it's that easy :smiley:)
118
120
119
-
### Updating side nav links
120
121
121
-
The file that needs to be updated is `/_inclues/sidebar.html`
122
+
#### Adding a page (example)
123
+
Let's say you want to add a 'Contact' page and it should appear as the last option on the top menu bar
122
124
123
-
Look for the `sidebar-nav-item` tags
125
+
1. Steps 1-3 in [Updating an existing page](#updating-an-existing-page)
126
+
2. Create a markdown file in the root directory. Since pages are sorted alphabetically, if you want the Contact page to be last in the menubar of the website, prefix the markdown filename with a '9' or 'z' for example
127
+
3. In the markdown file, the front matter should look like this:
128
+
129
+
```
130
+
---
131
+
layout: page
132
+
title: Contact
133
+
permalink: /contact/
134
+
---
135
+
```
136
+
- the layout should be 'page', to tell jekyll to use the page.html layout
137
+
- the title is what will be used in the top menu bar
138
+
- assigning a permalink will overwrite the default of using the ugly filename (e.g., `... .github.io/contact/` instead of `... .github.io/9contact/`)
124
139
125
-
### Testing locally
140
+
4. Underneath the front matter include whatever content you would like. You can add formatting to the file using markdown or html syntax.
141
+
5. Steps 5-7 in [Updating an existing page](#updating-an-existing-page)
126
142
127
-
If you want to test/preview the site locally as you make changes
0 commit comments