Skip to content

Commit 06f8d65

Browse files
committed
[PYT-1] Create Jekyll pages to map to site architecture
1 parent 6c005b3 commit 06f8d65

File tree

15 files changed

+164
-8
lines changed

15 files changed

+164
-8
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ include-yarn-deps:
3333
cp node_modules/bootstrap/dist/js/bootstrap.min.js $(VENDOR_DIR)
3434

3535
build: install include-yarn-deps
36-
$(JEKYLL) build
36+
$(JEKYLL) build --config _config.yml,_config_dev.yml
3737
rm _site/Gemfile
3838
rm _site/Gemfile.lock
3939
rm _site/Makefile
@@ -43,7 +43,7 @@ build: install include-yarn-deps
4343
rm -rf _site/scripts
4444

4545
serve: install include-yarn-deps
46-
JEKYLL_ENV=production $(JEKYLL) serve
46+
JEKYLL_ENV=production $(JEKYLL) serve --config _config.yml,_config_dev.yml
4747

4848
build_deploy: include-yarn-deps
4949
$(JEKYLL) build

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: "PyTorch Website"
33
author: "Shift Lab"
44
description: "Static website for pytorch.org"
5-
url: "https://shiftlab.github.io/pytorch"
5+
url: "https://shiftlab.github.io"
66
sass:
77
load_paths:
88
- _sass
99
- node_modules
1010
exclude: [vendor, node_modules]
1111
github: [metadata]
12-
baseurl: ""
12+
baseurl: "/pytorch"
1313
livereload: true

_config_dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
url: "http://localhost:4000"
2+
baseurl: ""

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<meta name="viewport" content="width=device-width, initial-scale=1.0">
44
<meta http-equiv="X-UA-Compatible" content="ie=edge">
55
<title>PyTorch</title>
6-
<link rel="stylesheet" href="./assets/main.css">
6+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/main.css">
77
</head>

_includes/nav.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<nav class="navbar navbar-expand-lg navbar-light bg-light">
2+
<a class="navbar-brand" href="{{ site.baseurl }}">Pytorch</a>
3+
4+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
5+
<span class="navbar-toggler-icon"></span>
6+
</button>
7+
<div class="collapse navbar-collapse" id="navbarNavDropdown">
8+
<ul class="navbar-nav ml-auto">
9+
<li class="nav-item">
10+
<a class="nav-link" href="{{ site.baseurl }}/get-started">Get Started</a>
11+
</li>
12+
<li class="nav-item">
13+
<a class="nav-link" href="{{ site.baseurl }}/ecosystem">Ecosystem</a>
14+
</li>
15+
<li class="nav-item">
16+
<a class="nav-link" href="{{ site.baseurl }}/blog">Blog</a>
17+
</li>
18+
<li class="nav-item">
19+
<a class="nav-link" href="{{ site.baseurl }}/support">Support</a>
20+
</li>
21+
</ul>
22+
</div>
23+
</nav>

_layouts/default.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
{% include head.html %}
44
<body>
55
<div class="container">
6+
{% include nav.html %}
67
{{ content }}
78
{% include footer.html %}
89
</div>
910

10-
<script src="{{'./assets/vendor/jquery.min.js'}}"></script>
11-
<script src="{{'./assets/vendor/popper.min.js'}}"></script>
12-
<script src="{{'./assets/vendor/bootstrap.min.js'}}"></script>
11+
<script src="{{ site.baseurl }}/assets/vendor/jquery.min.js"></script>
12+
<script src="{{ site.baseurl }}/assets/vendor/popper.min.js"></script>
13+
<script src="{{ site.baseurl }}/assets/vendor/bootstrap.min.js"></script>
1314
</body>
1415
</html>

_posts/2018-07-27-first-post.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
layout: default
3+
title: First Post
4+
category: [blog]
5+
---
6+
7+
# First Post
8+
9+
This is a demo of all styled elements in Jekyll.
10+
11+
This is a paragraph, it's surrounded by whitespace. Next up are some headers, they're heavily influenced by GitHub's markdown style.
12+
13+
## Header 2 (H1 is reserved for post titles)##
14+
15+
### Header 3
16+
17+
#### Header 4
18+
19+
A link to [Pytorch](https://pytorch.org). A literal link <https://pytorch.org>
20+
21+
An image, located within /assets/images
22+
23+
![an image alt text]({{ site.baseurl }}/assets/images/sample.jpg "an image title")
24+
25+
* A bulletted list
26+
- alternative syntax 1
27+
+ alternative syntax 2
28+
- an indented list item
29+
30+
1. An
31+
2. ordered
32+
3. list
33+
34+
Inline markup styles:
35+
36+
- _italics_
37+
- **bold**
38+
- `code()`
39+
40+
> Blockquote
41+
>> Nested Blockquote
42+
43+
Syntax highlighting can be used by wrapping your code in a liquid tag like so:
44+
45+
{{ "{% highlight javascript " }}%}
46+
/* Some pointless Javascript */
47+
var test = ["t", "e", "s", "t"];
48+
{{ "{% endhighlight " }}%}
49+
50+
creates...
51+
52+
{% highlight javascript %}
53+
/* Some pointless Javascript */
54+
var test = ["t", "e", "s", "t"];
55+
{% endhighlight %}
56+
57+
Use two trailing spaces
58+
on the right
59+
to create linebreak tags
60+
61+
Finally, horizontal lines
62+
63+
----
64+
****

assets/images/sample.jpg

9.01 KB
Loading

blog/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: default
3+
title: Blog
4+
permalink: blog.html
5+
---
6+
7+
<h1>Blog</h1>
8+
9+
{% for post in site.categories["blog"] %}
10+
<a href="{{ site.baseurl }}{{ post.url }}">
11+
{{ post.title }}
12+
</a>
13+
{% endfor %}

ecosystem/feature-1.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: default
3+
permalink: ecosystem/feature-1
4+
---
5+
6+
<h1>Feature 1</h1>

ecosystem/feature-2.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: default
3+
permalink: ecosystem/feature-2
4+
---
5+
6+
<h1>Feature 2</h1>

ecosystem/feature-3.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: default
3+
permalink: ecosystem/feature-3
4+
---
5+
6+
<h1>Feature 3</h1>

ecosystem/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: default
3+
title: Ecosystem
4+
permalink: ecosystem.html
5+
---
6+
7+
<h1>Ecosystem</h1>
8+
9+
<ul>
10+
<li>
11+
<a href="{{ site.baseurl }}/ecosystem/feature-1">Feature 1</a>
12+
</li>
13+
14+
<li>
15+
<a href="{{ site.baseurl }}/ecosystem/feature-2">Feature 2</a>
16+
</li>
17+
18+
<li>
19+
<a href="{{ site.baseurl }}/ecosystem/feature-3">Feature 3</a>
20+
</li>
21+
</ul>

get-started/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: Get Started
4+
permalink: get-started.html
5+
---
6+
7+
<h1>Get Started</h1>

support/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: Support
4+
permalink: support.html
5+
---
6+
7+
<h1>Support</h1>

0 commit comments

Comments
 (0)