Skip to content

Commit fc4b3ca

Browse files
authored
Merge pull request linode#20 from linode/development
Merge new gatsby site
2 parents ff5ef0e + 36483ce commit fc4b3ca

File tree

327 files changed

+18141
-11334
lines changed

Some content is hidden

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

327 files changed

+18141
-11334
lines changed

.gitignore

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1-
.DS_Store
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
236
node_modules/
3-
themes/linode-hugo-theme
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variables file
55+
.env
56+
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# Linode base theme
72+
linode-hugo-theme
73+
74+
themes/

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

themes/dlc/LICENSE renamed to LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2017 Adam Wathan <[email protected]>
3+
Copyright (c) 2015 gatsbyjs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+

README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,24 @@
1-
# developers-linode-com
1+
# DLC Built with Gatsby
22

3-
The developers.linode.com website.
3+
The developers.linode.com website built with Gatsby and including the API Docs
44

5-
## Tech/Framework
6-
7-
Built with:
8-
9-
* [Hugo](https://themes.gohugo.io/) (Golang)
10-
11-
## Running Locally
12-
13-
### Prerequisites
14-
15-
Must have Hugo installed:
16-
17-
`brew install hugo`
18-
19-
### Setup
20-
21-
From within your local developers-linode-com repository:
5+
## Setup
226

237
`yarn`
248

25-
then
9+
`yarn develop`
2610

27-
`gulp dev`
11+
you may need to install the Gatsby CLI as well `npm install -g gatsby-cli`
2812

29-
Once running, you should be able to view the site in a browser on port 1313:
13+
Check out the site at http://localhost:8000/
3014

31-
http://localhost:1313/
15+
### Build
3216

33-
## Deployment
17+
The API documentation in this site is also indexed in Algolia, so that
18+
it can be searched across Linode's services. The scripts for this are
19+
located in the `/search` directory. In order to run them correctly,
20+
you will need to create a `.env` file in the root directory with the
21+
following values:
3422

35-
### !!!! Important !!!!
36-
If you are merging/deploying changes to both this repository _and_ to
37-
the linode-hugo-theme repo on GitHub, **YOU MUST** merge the GitHub pull
38-
requests first! The order in which they are merged matters.
23+
ALGOLIA_API_KEY=(your key here)
24+
ALGOLIA_API_SECRET=(your secret here)

archetypes/default.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

config/_default/config.toml

Lines changed: 0 additions & 67 deletions
This file was deleted.

config/development/config.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

config/release/config.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

config/staging/config.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

content/api/v4/_index.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

content/changelog/_index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

content/guides/_index.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

content/libraries-tools/_index.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

data/carousel/welcome.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

data/features/docs.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/features/guides.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/features/libraries-tools.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/features2/community-site.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/features2/holder.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

dev_setup.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

gatsby-browser.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Implement Gatsby's Browser APIs in this file.
3+
*
4+
* See: https://www.gatsbyjs.org/docs/browser-apis/
5+
*/
6+
7+
const transitionDelay = 50;
8+
9+
exports.shouldUpdateScroll = ({ routerProps: { location } }) => {
10+
if (!location.hash || !document.getElementById(location.hash.substr(1))) {
11+
window.setTimeout(() => window.scrollTo(0, 0), transitionDelay);
12+
} else {
13+
window.setTimeout(
14+
() =>
15+
document
16+
.getElementById(location.hash.substr(1))
17+
.scrollIntoView({ block: "start", behavior: "smooth" }),
18+
transitionDelay
19+
);
20+
}
21+
return false;
22+
};

0 commit comments

Comments
 (0)