Skip to content

Commit cc16f8c

Browse files
committed
📝 more instructions
1 parent eb05374 commit cc16f8c

File tree

1 file changed

+45
-58
lines changed

1 file changed

+45
-58
lines changed

README.md

Lines changed: 45 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ Included are instructions for how to update the team website with a focus on the
1313
- [MUST READ - how jekyll works](#must-read---how-jekyll-works)
1414
- [Home page (default) vs. all other pages](#home-page-default-vs-all-other-pages)
1515
- [Updating website content](#updating-website-content)
16-
17-
- [Adding a page (example)](#adding-a-page-example)
16+
- [(OPTIONAL) Previewing changes locally](#optional-previewing-changes-locally)
1817
- [Updating an existing page](#updating-an-existing-page)
19-
- [Updating side nav links](#updating-side-nav-links)
20-
- [Testing locally](#testing-locally)
18+
- [Adding a page (example)](#adding-a-page-example)
19+
- [Updating side nav links](#updating-side-nav-links)
20+
- [Updating the styling ](#updating-the-styling)
2121
- [Original Author](#original-author)
2222
- [License](#license)
2323

24+
2425
## Directory organization of Repo
2526

2627
(only highlighting folders and files relevant to updating site)
@@ -49,6 +50,7 @@ Included are instructions for how to update the team website with a focus on the
4950

5051
```
5152

53+
5254
## MUST READ - how jekyll works
5355

5456
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/).
@@ -67,6 +69,7 @@ Included are instructions for how to update the team website with a focus on the
6769

6870
- **Do not alter the files in `_includes`, `_layouts` for now.**
6971

72+
7073
#### Home page (default) vs. all other pages
7174

7275
- 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/).
@@ -84,97 +87,81 @@ Included are instructions for how to update the team website with a focus on the
8487
permalink: /about/
8588
---
8689
```
87-
8890
- `layout: page` is to be used for almost all of the pages you want included in the site
89-
9091
- `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
91-
9292
>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."
9393
9494

9595
## Updating website content
9696

9797
- To update the contents of the website you will only need to add/remove/update markdown files in the main directory.
98-
9998
- To incorporate images or any other files into the site please put them in `/public/assets/`
10099

100+
#### (OPTIONAL) Previewing changes locally
101+
If you want to test/preview the site locally as you make changes
102+
103+
1. [install jekyll](https://jekyllrb.com/docs/installation/)
104+
2. in your terminal cd into the site's repo
105+
3. then run `jekyll serve --watch`
106+
4. open the url in `Server address: ...`
107+
5. To preview your changes don't forget to save your file and refresh the browser.
101108

102109
#### Updating an existing page
103110

104111
1. Clone this repository
105112
2. Create a branch from the 'master' branch of THIS repository (not the poole/hyde one)
106-
3.
107-
108-
- In the main directory, open the markdown file
109-
- make whatever changes to the content you want
110-
- save it and push changes
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 Master branch then jekyll will take care of the rest
111118

112119
(it's that easy :smiley:)
113120

114121

115-
116-
117122
#### Adding a page (example)
118-
119123
Let's say you want to add a 'Contact' page and it should appear as the last option on the top menu bar
120124

121-
- create a markdown file in the main directory
122-
123-
- 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
124-
125-
- in the markdown file, the front matter should look like this:
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:
126128

127-
```
128-
---
129-
layout: page
130-
title: Contact
131-
permalink: /contact/
132-
---
133-
```
134-
- the layout should be 'page', to tell jekyll to use the page.html layout
135-
- the title is what will be used in the top menu bar
136-
- assigning a permalink will overwrite the default of using the filename (e.g., *https:// ... io/9contact/* :thumbsdown:)
137-
138-
- underneath the front matter include whatever content you would like
139-
140-
- you can add formatting to the file using markdown or html syntax
141-
142-
- when done save and push changes, jekyll will take care of the rest
143-
144-
145-
## Updating the styling
146-
147-
- Extra: Updates to formating is done in the 3 directories: `/_includes/` `/_layouts/` and `/_public/`
148-
149-
### Updating side nav links
150-
151-
The file that needs to be updated is `/_inclues/sidebar.html`
152-
153-
Look for the `sidebar-nav-item` tags
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/`)
154139

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)
155142

156143

144+
#### Updating side nav links
145+
- similar steps to those in [Updating an existing page](#updating-an-existing-page)
146+
- However, the file that needs to be updated is `/_includes/sidebar.html`
147+
- Look for the `sidebar-nav-item` tags
157148

158-
### Testing locally
159149

160-
If you want to test/preview the site locally as you make changes
150+
## Updating the styling
151+
**:warning: Dangerous territory**
161152

162-
- [install jekyll](https://jekyllrb.com/docs/installation/)
163-
- in your terminal cd into the site's repo
164-
- then run `jekyll serve --watch`
153+
- Recall that the site template is [Hyde (see repo for more details)](https://github.com/poole/hyde) with some of our own modifications.
154+
- Updates to formating is done in the 3 directories: `/_includes/` `/_layouts/` and `/public/`
155+
- Requires HTML and CSS
165156

166157

167158
## Original Author
168-
169-
[please see hyde repo for more details](https://github.com/poole/hyde)
170-
159+
[Please see hyde repo for more details](https://github.com/poole/hyde)
171160
**Mark Otto**
172161
- <https://github.com/mdo>
173162
- <https://twitter.com/mdo>
174163

175-
176164
## License
177-
178165
Open sourced under the [MIT license](LICENSE.md).
179166

180167
<3

0 commit comments

Comments
 (0)