Skip to content

Commit 6ff5ffa

Browse files
authored
Sync aspects of old site with new site: (#65)
- Combine `_config.yml`s for the most part - Make /docs not an external URL - Use excludes instead of removing files/dirs in Makefile - etc. Tested locally. Also setup Netlify previews as well. Hopefully it works for this PR.
1 parent 36520a6 commit 6ff5ffa

File tree

1,488 files changed

+1125905
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,488 files changed

+1125905
-26
lines changed

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytorch.org

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2018, Facebook Inc
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

-14
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,9 @@ include-yarn-deps:
3535

3636
build: install include-yarn-deps
3737
$(JEKYLL) build --config _config.yml
38-
rm _site/Gemfile
39-
rm _site/Gemfile.lock
40-
rm _site/Makefile
41-
rm _site/package.json
42-
rm -f _site/yarn-error.log
43-
rm _site/yarn.lock
44-
rm -rf _site/scripts
4538

4639
serve: install include-yarn-deps
4740
JEKYLL_ENV=development $(JEKYLL) serve --config _config.yml
4841

4942
build_deploy: include-yarn-deps
5043
JEKYLL_ENV=production $(JEKYLL) build
51-
rm _site/Gemfile
52-
rm _site/Gemfile.lock
53-
rm _site/Makefile
54-
rm _site/package.json
55-
rm -f _site/yarn-error.log
56-
rm _site/yarn.lock
57-
rm -rf _site/scripts

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# shiftlab/pytorch
1+
# pytorch.org site
22

3-
[https://shiftlab.github.io/pytorch](https://shiftlab.github.io/pytorch)
3+
[https://pytorch.org](https://pytorch.org)
44

55
A static website built in [Jekyll](https://jekyllrb.com/) and [Bootstrap](https://getbootstrap.com/) for [PyTorch](https://pytorch.org/), and its tutorials and documentation.
66

7-
##Prerequisites
7+
## Prerequisites
88

99
Install the following packages before attempting to setup the project:
1010

@@ -67,8 +67,8 @@ This will build the static site at `./_site`. This directory is not tracked in g
6767

6868
## Deployments
6969

70-
The website is hosted on [Github Pages](https://pages.github.com/) at [https://shiftlab.github.io/pytorch](https://shiftlab.github.io/pytorch).
70+
The website is hosted on [Github Pages](https://pages.github.com/) at [https://pytorch.org](https://pytorch.org).
7171

72-
To deploy changes, merge your latest code into the `master` branch. A build will be automatically built and commited to the `gh-pages` branch via a CircleCI job.
72+
To deploy changes, merge your latest code into the `sites` branch. A build will be automatically built and committed to the `master` branch via a CircleCI job.
7373

74-
To view the status of the build visit [https://circleci.com/gh/shiftlab/pytorch](https://circleci.com/gh/shiftlab/pytorch).
74+
To view the status of the build visit [https://circleci.com/gh/pytorch/pytorch.github.io](https://circleci.com/gh/pytorch/pytorch.github.io).

_config.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# Site settings
22
title: "PyTorch Website"
33
author: "Facebook"
4-
description: "Static website for pytorch.org"
5-
url: "https://pytorch.org"
64
default_author: The PyTorch Team
5+
description: "Scientific Computing..."
6+
latest_version: 1.0
7+
timezone: America/Los_Angeles
8+
url: "https://pytorch.org"
9+
baseurl: ""
710
plugins:
811
- jekyll-paginate-v2
912
- jekyll-redirect-from
1013
- jekyll-autoprefixer
14+
- jekyll-feed
1115
sass:
1216
load_paths:
1317
- _sass
1418
- node_modules
15-
exclude: [vendor, node_modules]
19+
exclude: [vendor, node_modules, README.md, Gemfile, Gemdile.lock, yarn.lock, yarn-error.log, package.json, Makefile, scripts]
20+
include: [_static, _images, _modules, _sources, _tensor_str.html, _utils.html]
1621
github: [metadata]
17-
baseurl: ""
1822
external_urls:
1923
github: https://github.com/pytorch/pytorch
2024
github_issues: https://github.com/pytorch/pytorch/issues
2125
contributing: https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md
22-
docs: https://pytorch.org/docs
2326
twitter: https://twitter.com/pytorch
2427
facebook: https://www.facebook.com/pytorch
2528
slack: https://pytorch.slack.com
@@ -62,3 +65,5 @@ pagination:
6265
trail:
6366
before: 2
6467
after: 2
68+
69+
# google_site_verification: eOAFtDphTbbm4OPKva2d3Z0Z_2bBxWMGdkD0IRQ6VeA

_includes/main_menu.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</li>
2222

2323
<li>
24-
<a href="{{ site.external_urls.docs }}">Docs</a>
24+
<a href="{{ site.baseurl }}/docs">Docs</a>
2525
</li>
2626

2727
<li class="{% if current[1] == 'resources' %}active{% endif %}">

_layouts/redirect.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="refresh" content="1; url={{ page.redirect_url }}">
6+
<script type="text/javascript">
7+
window.location.href = "{{ page.redirect_url }}"
8+
</script>
9+
<title>Page Redirection</title>
10+
</head>
11+
<body>
12+
If you are not redirected automatically, follow this <a href='{{ page.redirect_url }}'>link to the latest documentation</a>.
13+
<br />
14+
If you want to view documentation for a particular version, follow this <a href='versions.html'>link</a>.
15+
</body>
16+
</html>

docs/0.1.12/.buildinfo

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: e3c0334253ce75f93e455219de7c5075
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

0 commit comments

Comments
 (0)