Skip to content

Commit 18c20e2

Browse files
bepnmelehan
authored andcommitted
Set up the new UI as a theme, step 1
1 parent f9759f2 commit 18c20e2

File tree

130 files changed

+4936
-32168
lines changed

Some content is hidden

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

130 files changed

+4936
-32168
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ Thumbs.dbi
3535
*.elc
3636
.\#*
3737
*.sublime-workspace
38+
node_modules
39+
public/
40+
resources/_gen/assets
41+
yarn.lock
42+
search_index/
43+
hugo_stats.json

babel.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
useBuiltIns: 'entry',
7+
corejs: 3
8+
}
9+
]
10+
]
11+
};

config.toml

+96-52
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,112 @@
11
baseURL = "https://linode.com/docs/"
22
languageCode = "en-us"
33
title = "Linode Guides & Tutorials"
4-
theme = "docsmith"
5-
6-
contentDir = "docs"
7-
8-
# Highlighting config (Pygments)
9-
10-
# Styles created with hugo gen chromastyles --style=perldoc > assets/stylesheets/_syntax-chroma.css
11-
pygmentsUseClasses = true
12-
pygmentsCodeFences = true
13-
14-
# Use the new and fast Chroma highlighter (Pygments port) in Hugo >= 0.28.
15-
pygmentsUseClassic = false
16-
17-
# See https://help.farbox.com/pygments.html
18-
# Also see pygmentsUseClasses above.
19-
pygmentsStyle = "perldoc"
20-
21-
disqusShortname="linode-1"
22-
23-
#disableKinds = ["taxonomy", "taxonomyTerm"]
244

5+
disableKinds = ["taxonomy", "taxonomyTerm"]
6+
themeDir = ".."
257
rssLimit = 30
8+
summaryLength = 15
9+
timeout = "2m"
2610

27-
enableGitInfo = true
11+
[outputs]
12+
# The JSON is for the search index. We build this on every build to make sure we have the image thumbnails in sync.
13+
home = ["HTML", "JSON", "RSS"]
2814

2915
[frontmatter]
3016
lastmod = [":git", "lastmod", "date", "publishDate"]
3117

32-
[blackfriday]
33-
fractions = false
34-
35-
[outputs]
36-
home = [ "HTML", "RSS"]
37-
section = ["HTML"]
38-
page = ["HTML"]
39-
40-
[taxonomies]
41-
audience = "audiences"
42-
concentration = "concentrations"
43-
language = "languages"
44-
4518
[params]
4619
description = "Guides and tutorials on the Linode platform, Linux basics, and software installation and configuration."
47-
default_image_width = 120
48-
default_image_height = 120
49-
5020
# Date and time formatting, see https://gohugo.io/functions/format/
5121
time_format_RFC3339 = "2006-01-02T15:04:05Z07:00"
5222
time_format_default = "Monday, January 2, 2006"
5323

54-
55-
# Related Content ("See Also") configuration.
56-
# [related]
57-
# threshold = 80
58-
# includeNewer = true
59-
# toLower = false
60-
#
61-
# [[related.indices]]
62-
# name = "keywords"
63-
# weight = 100
64-
# [[related.indices]]
65-
# name = "date"
66-
# weight = 10
67-
# pattern = "2006"
68-
24+
[params.search_config]
25+
app_id = "KGUN8FAIPF"
26+
api_key = "d4847002cd30392fe0fbd00a1da933ed"
27+
meta_index = "linode-docs-sections-bep"
28+
explorer_max_leafnodes = 50
29+
hits_per_page = 4
30+
31+
[[params.search_config.sections]]
32+
name = "products"
33+
index = "linode-docs-bep"
34+
title = "Products"
35+
filters = "section.lvl0:products"
36+
# The icons are fetched from layouts/sections/navigation/explorer-icons.html
37+
explorer_icon = "#icon-explorer--products"
38+
explorer_map_title = true
39+
filtering_facets = [
40+
{ name = "category", title = "Doc Category" },
41+
{ name = "skillLevel", title = "Skill Level" },
42+
{ name = "languages", title = "Languages" }
43+
]
44+
explorer_regular_pages_start_level = 2
45+
hits_per_page = 4
46+
47+
[[params.search_config.sections]]
48+
name = "docs"
49+
index = "linode-docs-bep"
50+
title = "Guides"
51+
filters = "section.lvl0:docs"
52+
explorer_icon = "#icon-explorer--guides"
53+
explorer_map_title = true
54+
filtering_facets = [
55+
{ name = "category", title = "Doc Category" },
56+
{ name = "skillLevel", title = "Skill Level" },
57+
{ name = "languages", title = "Languages" },
58+
{ name = "tags", title = "Tags", isTags = true }
59+
]
60+
explorer_regular_pages_start_level = 2
61+
hits_per_page = 4
62+
63+
[[params.search_config.sections]]
64+
name = "api"
65+
index = "linode-docs-api-bep"
66+
title = "API"
67+
filters = "section.lvl0:api"
68+
explorer_icon = "#icon-explorer--api"
69+
explorer_regular_pages_start_level = 2
70+
hits_per_page = 4
71+
filtering_facets = [{ name = "category", title = "Doc Category" }]
72+
73+
[[params.search_config.sections]]
74+
name = "marketplace"
75+
index = "linode-wp"
76+
title = "Marketplace"
77+
filters = "section.lvl0:Marketplace"
78+
explorer_icon = "#icon-explorer--products"
79+
explorer_regular_pages_start_level = 2
80+
hits_per_page = 4
81+
filtering_facets = [{ name = "category", title = "Doc Category" }]
82+
83+
[[params.search_config.sections]]
84+
name = "blog"
85+
index = "linode-wp-blog"
86+
title = "Blog"
87+
filters = "section.lvl0:Blog"
88+
explorer_icon = "#icon-explorer--blog"
89+
explorer_regular_pages_start_level = 2
90+
hits_per_page = 4
91+
filtering_facets = [{ name = "category", title = "Doc Category" }]
92+
93+
[[params.search_config.sections]]
94+
# Identifier. It's also used as the Algolia index name.
95+
# If you need to map several sections to one Algolia index,
96+
# set the index attribute.
97+
name = "resources"
98+
index = "linode-wp-resources"
99+
title = "Resources"
100+
filters = "section.lvl0:Resources"
101+
explorer_icon = "#icon-explorer--resources"
102+
explorer_regular_pages_start_level = 2
103+
hits_per_page = 4
104+
filtering_facets = [{ name = "category", title = "Doc Category" }]
105+
106+
[minify]
107+
disableSVG = true
108+
109+
[imaging]
110+
resampleFilter = "CatmullRom"
111+
quality = 75
112+
anchor = "smart"

config/_default/markup.toml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Highlighting config (Pygments)
2+
# Styles created with
3+
# hugo gen chromastyles --style=github > assets/css/components/chroma.css
4+
# hugo gen chromastyles --style=monokai > assets/css/components/chroma_dark.css
5+
# Note that for the dark stylesheet, you need to do a search replace to prefix them with the .dark selector.
6+
[highlight]
7+
codeFences = true
8+
guessSyntax = false
9+
hl_Lines = ""
10+
lineNoStart = 1
11+
lineNos = true
12+
lineNumbersInTable = true
13+
noClasses = false
14+
style = "github"
15+
tabWidth = 4
16+
17+
[tableOfContents]
18+
startLevel = 2
19+
endLevel = 4
20+
ordered = true
21+
22+
[goldmark]
23+
24+
[goldmark.parser]
25+
attribute = true
26+
autoHeadingID = true
27+
autoHeadingIDType = "github"
28+
29+
[goldmark.renderer]
30+
hardWraps = false
31+
unsafe = true
32+
xhtml = false

config/_default/module.toml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# Mounts in this project.
3+
[[mounts]]
4+
source = "docs"
5+
target = "content"
6+
7+
[[mounts]]
8+
source = "products"
9+
target = "content/products"
10+
11+
[[mounts]]
12+
source = "static"
13+
target = "static"
14+
15+
# The main theme.
16+
# Note that the theme itself contains the mount configuration.
17+
[[imports]]
18+
path = "github.com/bep/linodedocs"
19+
20+
# To add it to the server watch list.
21+
source = "tailwind.config.js"
22+
target = "assets/css/tailwind.config.js"
23+
24+
# Linode's OpenAPI definition.
25+
[[imports]]
26+
path = "github.com/linode/linode-api-docs"
27+
28+
[[imports.mounts]]
29+
source = "openapi.yaml"
30+
target = "assets/api/openapi.yaml"
31+
32+

config/development/server.toml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[[headers]]
2+
for = "/*"
3+
4+
[headers.values]
5+
X-Frame-Options = "DENY"
6+
X-XSS-Protection = "1; mode=block"
7+
X-Content-Type-Options = "nosniff"
8+
Referrer-Policy = "no-referrer"
9+
Content-Security-Policy = "script-src 'self' *.trustarc.com 'unsafe-eval'"
10+
11+
[[headers]]
12+
for = "/**.{css,jpg,js}"
13+
14+
[headers.values]
15+
Cache-Control = "public, max-age=2"
16+
17+
[[redirects]]
18+
from = "/docs/blog/**"
19+
to = "/docs/blog/"
20+
status = 200
21+
22+
[[redirects]]
23+
from = "/docs/sections/**"
24+
to = "/docs/sections/"
25+
status = 200

config/production/build.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Writes the hugo_stats.json file used for CSS pruning.
2+
writeStats = true

go.mod

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module github.com/linode/docs
2+
3+
go 1.15
4+
5+
require github.com/bep/linodedocs v0.0.0-20200907181511-0147907b2c32 // indirect
6+
7+
8+
replace github.com/bep/linodedocs => /Users/bep/dev/sites/linode/linodedocs

go.sum

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
github.com/alpinejs/alpine v2.5.0+incompatible/go.mod h1:BKI81egATMnaKqFeX5HEfYMnjZjcjcZmrYAu5Nck+EY=
2+
github.com/alpinejs/alpine v2.6.0+incompatible/go.mod h1:BKI81egATMnaKqFeX5HEfYMnjZjcjcZmrYAu5Nck+EY=
3+
github.com/bep/hugo-jslibs/alpinejs v0.5.14/go.mod h1:AKan86yhrI16Cp+ga/+UuRkBgaO25SpubHWFgMTzh3o=
4+
github.com/bep/hugo-jslibs/instantpage v0.0.0-20200822093604-7b6e0aaba587/go.mod h1:Ezl32tElGtVVOdR7j1MZQHJOTbKL/iXO2Qtj4NOGkBs=
5+
github.com/bep/hugo-jslibs/turbolinks v0.1.2/go.mod h1:CQHa51PjmF5gavvhS3JKSE9ywo8h7QgOj3D88ry6qu0=
6+
github.com/bep/linodedocs v0.0.0-20200907181511-0147907b2c32 h1:zCV40Hxitmya8zWvcUDg7EAPX7llhNZBWgYL02Blhl8=
7+
github.com/bep/linodedocs v0.0.0-20200907181511-0147907b2c32/go.mod h1:S6J2bvTp/BMG2Qau6jZkapEQZOQZjIPSvNoKToJlHIg=
8+
github.com/gohugoio/hugo-mod-jslibs/alpinejs v0.5.0/go.mod h1:XvAGp/0tQ8bZpoCcM6rdx1NbzZUy3/KtetedtdgaNek=
9+
github.com/gohugoio/hugo-mod-jslibs/instantpage v0.5.1/go.mod h1:N4EUbbL7Cw4Yq+GHeK3MUSiOJQbzfuUFRyvBKvnVBR8=
10+
github.com/gohugoio/hugo-mod-jslibs/turbolinks v0.5.0/go.mod h1:0COpoSU/YogktyDLZn4aoXioJPq+f4jvdenIZj5ozMQ=
11+
github.com/instantpage/instant.page v5.1.0+incompatible/go.mod h1:GXVDktwI+K4T9o5mcK2NYDqPFxAUrB9U9goR9oG1SaI=
12+
github.com/linode/linode-api-docs v4.73.0+incompatible/go.mod h1:mTkxejkk3Y6N4IfEQRGb1xC0EOPl12bWNWt3PzAUD7g=
13+
github.com/linode/linode-website-partials v0.0.0-20200907163220-d3856e759e21/go.mod h1:e68x+kyP45JvsnatClDG16z9uAQ/Fg8gBDwpI6KMNI0=
14+
github.com/turbolinks/turbolinks-source-gem v5.2.0+incompatible/go.mod h1:Cl0Br9tUXkQvxumVNGTvyaa7dqpFC2kPMrsS0Ttc94U=

0 commit comments

Comments
 (0)