Skip to content

Commit cf86cb9

Browse files
Rob j LorangerCharlotte Spencer
Rob j Loranger
authored and
Charlotte Spencer
committed
Refactor template includes (#51)
* broke out nav partial, dynamic active id * added nice things to _config.yml, TODO needs description * dynamic page titles form front matter * added site meta description in _config.yml, changed default author to Your First PR
1 parent dd6c2d8 commit cf86cb9

File tree

5 files changed

+48
-46
lines changed

5 files changed

+48
-46
lines changed

Diff for: _config.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# Site settings
2-
title: Your First Pull Request - Showcasing good starter issues
2+
title: Your First Pull Request
3+
description: >
4+
Your First PR helps you get started contributing to Open Source by showcasing great starter isuues on Github and elsewhere.
5+
36
baseurl: ""
4-
url: "http://yourfirstpr.github.io/"
7+
url: "http://yourfirstpr.github.io/"
8+
9+
# default site author info
10+
author:
11+
name: Your First PR
12+
13+
# don't build repo only files
14+
exclude: ["README.md", "CODEOFCONDUCT.md"]

Diff for: _includes/header.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<header role='banner'>
2+
<h1>Your First PR</h1>
3+
<nav role='navigation'>
4+
<ul>
5+
<li><a href='/' {% if page.url == '/index.html' %}id="active"{% endif %}>Home</a></li>
6+
<li><a href='coc.html' {% if page.url == '/coc.html' %}id="active"{% endif %}>Code of Conduct</a></li>
7+
</ul>
8+
</nav>
9+
</header>

Diff for: _layouts/default.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
<html lang='en'>
33
<head>
44
<meta charset='UTF-8'>
5-
<title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
5+
<meta name="description" content="{{ site.description }}" />
6+
<title>{{ site.title }}{% if page.title %} - {{ page.title }}{% endif %}</title>
67
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
78
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.2/normalize.min.css'>
89
<link rel='stylesheet' href='assets/css/styles.css'>
910
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
1011
</head>
1112
<body>
12-
{{ content }}
13+
{% include header.html %}
14+
<div role='main' id="main">
15+
{{ content }}
16+
</div>
1317
{% include footer.html %}
1418
</body>
1519
</html>

Diff for: coc.html

+20-31
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,23 @@
22
layout: default
33
title: Code of conduct
44
---
5-
<header role='banner'>
6-
<h1>Your First PR</h1>
7-
<nav role='navigation'>
8-
<ul>
9-
<li><a href='/'>Home</a></li>
10-
<li><a href='./coc.html' id='active'>Code of Conduct</a></li>
11-
</ul>
12-
</nav>
13-
</header>
14-
<div role='main' id="main">
155
<section id='#introduction'>
166
<h2>Code of Conduct</h2>
177
<p id='headline'>
188
All contributors and maintainers of this project are subject to this code of conduct.
199
</p>
2010

2111
<p>
22-
As contributors and maintainers of this project, and in the interest of
23-
fostering an open and welcoming community, we pledge to respect all people who
24-
contribute through reporting issues, posting feature requests, updating
12+
As contributors and maintainers of this project, and in the interest of
13+
fostering an open and welcoming community, we pledge to respect all people who
14+
contribute through reporting issues, posting feature requests, updating
2515
documentation, submitting pull requests or patches, and other activities.
2616
</p>
2717

2818
<p>
29-
We are committed to making participation in this project a harassment-free
30-
experience for everyone, regardless of level of experience, gender, gender
31-
identity and expression, sexual orientation, disability, personal appearance,
19+
We are committed to making participation in this project a harassment-free
20+
experience for everyone, regardless of level of experience, gender, gender
21+
identity and expression, sexual orientation, disability, personal appearance,
3222
body size, race, ethnicity, age, religion, or nationality.
3323
</p>
3424

@@ -45,37 +35,36 @@ <h2>Code of Conduct</h2>
4535
</p>
4636

4737
<p>
48-
Project maintainers have the right and responsibility to remove, edit, or
49-
reject comments, commits, code, wiki edits, issues, and other contributions
50-
that are not aligned to this Code of Conduct, or to ban temporarily or
51-
permanently any contributor for other behaviors that they deem inappropriate,
38+
Project maintainers have the right and responsibility to remove, edit, or
39+
reject comments, commits, code, wiki edits, issues, and other contributions
40+
that are not aligned to this Code of Conduct, or to ban temporarily or
41+
permanently any contributor for other behaviors that they deem inappropriate,
5242
threatening, offensive, or harmful.
5343
</p>
5444

5545
<p>
56-
By adopting this Code of Conduct, project maintainers commit themselves to
57-
fairly and consistently applying these principles to every aspect of managing
58-
this project. Project maintainers who do not follow or enforce the Code of
46+
By adopting this Code of Conduct, project maintainers commit themselves to
47+
fairly and consistently applying these principles to every aspect of managing
48+
this project. Project maintainers who do not follow or enforce the Code of
5949
Conduct may be permanently removed from the project team.
6050
</p>
6151

6252
<p>
63-
This code of conduct applies both within project spaces and in public spaces
53+
This code of conduct applies both within project spaces and in public spaces
6454
when an individual is representing the project or its community.
6555
</p>
6656

6757
<p>
68-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
69-
reported by contacting a project maintainer at <a href='mailto:[email protected]'>[email protected]</a>. All
70-
complaints will be reviewed and investigated and will result in a response that
71-
is deemed necessary and appropriate to the circumstances. Maintainers are
72-
obligated to maintain confidentiality with regard to the reporter of an
58+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
59+
reported by contacting a project maintainer at <a href='mailto:[email protected]'>[email protected]</a>. All
60+
complaints will be reviewed and investigated and will result in a response that
61+
is deemed necessary and appropriate to the circumstances. Maintainers are
62+
obligated to maintain confidentiality with regard to the reporter of an
7363
incident.
7464
</p>
7565

7666
<p>
77-
This Code of Conduct is adapted from the <a href='http://contributor-covenant.org'>Contributor Covenant homepage</a>,
67+
This Code of Conduct is adapted from the <a href='http://contributor-covenant.org'>Contributor Covenant homepage</a>,
7868
version 1.3.0, available at <a href='http://contributor-covenant.org/version/1/3/0/'>http://contributor-covenant.org/version/1/3/0/</a>.
7969
</p>
8070
</section>
81-
</div>

Diff for: index.html

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
---
22
layout: default
3+
title: Showcasing good starter issues
34
---
4-
<header role='banner'>
5-
<h1>Your First PR</h1>
6-
<nav role='navigation'>
7-
<ul>
8-
<li><a href='/' id='active'>Home</a></li>
9-
<li><a href='./coc.html'>Code of Conduct</a></li>
10-
</ul>
11-
</nav>
12-
</header>
13-
<div role='main' id="main">
145
<section id='#introduction'>
156
<h2>Hello!</h2>
167
<p id='headline'>
@@ -44,4 +35,3 @@ <h3>Community</h3>
4435
to a project, send us a tweet or create an issue on our
4536
<a href='https://github.com/yourfirstpr/yourfirstpr.github.io/issues'>Github's Issue Page</a>.
4637
</section>
47-
</div>

0 commit comments

Comments
 (0)