Skip to content

Commit 64a9fed

Browse files
authored
Merge branch 'main' into MvM-HighlightTOC-DocsyPR506
2 parents f7800ce + 6c2a6db commit 64a9fed

23 files changed

Lines changed: 951 additions & 124 deletions

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
# docs-site-test
1+
# docs-site-test
2+
3+
## Branches
4+
5+
* **main** – default branch
6+
* **development** – development branch for testing Travis integration
7+
* **master** – master branch for testing Travis integration
8+

assets/js/landingtabs.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// NK - Tabs implementation taken from https://github.com/fluxcd/website
2+
// Copyright 2021 fluxcd.io
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
var $ = window.$;
15+
16+
$('.tab-content').find('.tab-pane').each(function (idx, item) {
17+
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs');
18+
var title = $(this).attr('title');
19+
navTabs.append('<li class="nav-tab tabby"><a href="#" class="nav-tab">' + title + '</a></li>');
20+
});
21+
22+
$('.code-tabs ul.nav-tabs').each(function () {
23+
$(this).find('li:first').addClass('active');
24+
});
25+
26+
$('.code-tabs .tab-content').each(function () {
27+
$(this).find('div:first').addClass('active');
28+
});
29+
30+
$('.nav-tabs a').click(function (e) {
31+
e.preventDefault();
32+
var tab = $(this).parent();
33+
var tabIndex = tab.index();
34+
var tabPanel = $(this).closest('.code-tabs');
35+
var tabPane = tabPanel.find('.tab-pane').eq(tabIndex);
36+
tabPanel.find('.active').removeClass('active');
37+
tab.addClass('active');
38+
tabPane.addClass('active');
39+
});

assets/scss/_code.scss

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Code formatting.
2+
3+
.td-content {
4+
// Highlighted code.
5+
.highlight {
6+
@extend .card;
7+
8+
margin: 2rem 0;
9+
padding: 0;
10+
11+
pre {
12+
margin: 0;
13+
padding: 1rem;
14+
}
15+
}
16+
17+
// Inline code
18+
p code, li > code, table code {
19+
color: inherit;
20+
padding: 0.1em 0.1em; // NK - made padding smaller
21+
margin: 0;
22+
word-break: normal;
23+
background-color: rgba($info, 0.07); // NK - changed background color
24+
border-radius: $border-radius;
25+
border: 1px solid rgba($info, 0.1); // NK - added border and color
26+
27+
br {
28+
display: none;
29+
}
30+
}
31+
32+
33+
// Code blocks
34+
pre {
35+
word-wrap: normal;
36+
background-color: $gray-100;
37+
padding: $spacer;
38+
line-height: 1.1; // NK - added to match code text
39+
font-size: 1em; // NK - added to match code text
40+
41+
42+
> code {
43+
background-color: inherit !important;
44+
padding: 0;
45+
margin: 0;
46+
font-size: 100%;
47+
word-break: normal;
48+
white-space: pre;
49+
border: 0;
50+
}
51+
}
52+
53+
pre.mermaid {
54+
background-color: inherit;
55+
font-size: 0;
56+
}
57+
}

assets/scss/_landingtabs.scss

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// NK - Tabs implementation taken from https://github.com/fluxcd/website
2+
// Copyright 2021 fluxcd.io
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
ul.nav.nav-tabs {
15+
list-style-type: none;
16+
overflow: hidden;
17+
content: none;
18+
border-bottom-color: $gray-600;
19+
//border-bottom-width: 0.5px;
20+
border-bottom-style: solid;
21+
border-bottom-width: 0.1rem;
22+
}
23+
24+
li.nav-tab.tabby {
25+
padding: 10px 20px;
26+
float: left;
27+
text-align: center;
28+
text-decoration: none;
29+
text-transform: uppercase;
30+
font-weight: bold;
31+
color: $gray-600;
32+
//font-size: 14px;
33+
}
34+
35+
li.tabby.active {
36+
color: $secondary;
37+
border-color: $secondary;
38+
border-bottom-style: solid;
39+
border-bottom-width: 0.2rem;
40+
background: transparent;
41+
}
42+
43+
a.nav-tab {
44+
all: unset;
45+
cursor: pointer;
46+
}
47+
48+
div.tab-pane {
49+
display: none;
50+
}
51+
52+
div.tab-pane.active {
53+
display: block;
54+
padding: 20px;
55+
background: $white;
56+
}
57+
58+
code {
59+
word-break: keep-all;
60+
}
61+
62+
.hero-logo {
63+
margin-bottom: -2rem;
64+
width: 60%;
65+
}
66+
67+
footer.auto-height {
68+
min-height: auto;
69+
}
70+
71+
.inline-svg {
72+
display: inline-block;
73+
vertical-align: middle;
74+
75+
svg {
76+
width: 1em;
77+
height: 1em;
78+
fill: currentColor;
79+
display: inline-block;
80+
}
81+
}

assets/scss/_variables_project.scss

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,37 @@ $td-enable-google-fonts: true !default;
2020
// NK - changed almost all colors to better match Mendix palette
2121
// Codes taken from https://www.mendix.design/guidelines
2222

23-
$primary: #0D2ED1 !default; // MX Ultramarine
23+
$primary: #0CABF9 !default; // MX Blue NK - changed primary blues to be Mendix Blue
2424
$primary-light: lighten($primary, 75%) !default;
25-
$secondary: #041325 !default; // MX Midnight 100 (MxDock color)
25+
$secondary: #0A1325 !default; // MX Midnight 100 (MxDock color)
2626
$success: #77DD77 !default; // MX Green
2727
$info: #0CABF9 !default; // MX Blue
2828
$warning: #FACA4A !default; // MX Yellow
2929
$danger: #FF6161 !default; // MX Coral
3030
$white: #fff !default;
3131
$light: #D3F3EE !default;
3232

33-
$dark: #041325 !default;
34-
$blue: #0D2ED1 !default; // MX Ultramarine
33+
$dark: #0A1325 !default; // MX Midnight 100 (MxDock color)
34+
$blue: #0CABF9 !default; // MX Blue
3535
$orange: #BA5A31 !default;
36-
$gray-100: #f8f9fa !default;
37-
$gray-200: #eee !default;
36+
$gray-100: #F8F8F8 !default; // NK - changed to better align to Figma Docs mockup
37+
$gray-200: #E7E7E9 !default; // NK - changed to better align to Figma Docs mockup
3838
$gray-300: #dee2e6 !default;
3939
$gray-400: #E6E7E9 !default; // MX Midnight 10
4040
$gray-500: #CED0D3 !default; // MX Midnight 20
4141
$gray-600: #9DA1A8 !default; // MX Midnight 40
4242
$gray-700: #6C717C !default; // MX Midnight 60
4343
$gray-800: #3B4251 !default; // MX Midnight 80
44-
$gray-900: #041325 !default; // MX Midnight 100
44+
$gray-900: #0A1325 !default; // MX Midnight 100
4545
$black: #000 !default;
4646

4747
$code-color: darken($secondary, 20%) !default;
4848

4949
// UI element colors
5050

51-
$border-color: $gray-300 !default;
51+
$border-color: $gray-200 !default; // NK - changed to better align to Figma Docs mockup
5252
$td-sidebar-tree-root-color: $secondary !default; // NK - switched top left nav bar link and line color to secondary
53-
$td-sidebar-bg-color: rgba($primary, 0.03) !default;
53+
$td-sidebar-bg-color: $gray-100 !default;//rgba($primary, 0.03) !default;
5454
$td-sidebar-border-color: $border-color !default;
5555

5656
// Background colors for the sections on home page etc. It is a paint by number system, starting at 0, where the number is taken from the shortcode's ordinal
@@ -65,10 +65,10 @@ $link-hover-decoration: none !default;
6565

6666
// Fonts
6767

68-
$google_font_name: "Open Sans" !default;
69-
$google_font_family: "Open+Sans:300,300i,400,400i,700,700i" !default;
70-
$web-font-path: "https://fonts.googleapis.com/css?family=#{$google_font_family}&display=swap";
71-
68+
$google_font_name: "Noto Sans" !default; // NK - changed to Mendix font
69+
$google_font_family: "Noto+Sans" !default; // NK - changed to Mendix font
70+
$web-font-path: "https://fonts.googleapis.com/css2?family=#{$google_font_family}&display=swap"; // NK - changed to Mendix font
71+
$font-family: "Noto Sans"; // NK - changed to Mendix font
7272
$td-fonts-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
7373

7474
@if $td-enable-google-fonts {
@@ -78,7 +78,7 @@ $td-fonts-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helveti
7878
$font-family-sans-serif: $td-fonts-serif !default;
7979

8080
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
81-
$font-family-base: $font-family-sans-serif !default;
81+
$font-family-base: $font_family !default; // NK - changed to Mendix font
8282
$font-size-base: 1rem !default; // NK - if we want 14px default -> 0.875rem
8383

8484
// Font weights
@@ -141,4 +141,4 @@ $yiq-contrasted-threshold: 200 !default;
141141

142142
// $grid-columns: 12 !default;
143143
// $grid-gutter-width: 50px !default;
144-
// $grid-row-columns: 6 !default;
144+
// $grid-row-columns: 6 !default;

assets/scss/main.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import "variables_project";
2+
@import "../../themes/docsy/assets/scss/main.scss";
3+
@import "support/_utilities";
4+
@import "alerts";
5+
@import "code";
6+
@import "front-page";
7+
@import "landingtabs";
8+
@import "main-container";
9+
@import "nav";
10+
@import "sidebar-toc";
11+
@import "sidebar-tree";
12+

config.toml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
baseURL = "http://example.org/"
1+
baseURL = "http://mendix-new-docs-site.s3-website.eu-central-1.amazonaws.com/"
22
languageCode = "en-us"
3-
title = "My New Hugo Site"
3+
title = "Mendix Docs Test Site"
44

55
enableRobotsTXT = true
66

@@ -23,30 +23,33 @@ enableMissingTranslationPlaceholders = true
2323
disableKinds = ["taxonomy","taxonomyTerm"]
2424

2525
# NK - taxonomy section adds the tag cloud to the ToC section - need to comment out "disableKinds"
26-
# [params.taxonomy]
27-
# taxonomyCloud = ["tags"] # set taxonomyCloud = [] to hide taxonomy clouds
28-
# taxonomyCloudTitle = [] # if used, must have same lang as taxonomyCloud
29-
# taxonomyPageHeader = [] # set taxonomyPageHeader = [] to hide taxonomies on the page headers
26+
# NK - values can be empty to not have tags, instead of commented out
27+
[params.taxonomy]
28+
taxonomyCloud = [] #["tags"] # set taxonomyCloud = [] to hide taxonomy clouds
29+
taxonomyCloudTitle = [] # if used, must have same lang as taxonomyCloud
30+
taxonomyPageHeader = [] # set taxonomyPageHeader = [] to hide taxonomies on the page headers
3031

3132
# Highlighting config
32-
pygmentsCodeFences = true
33-
pygmentsUseClasses = false
33+
# NK - commented out all regarding Chroma and Pygments, as we use Prism
34+
#pygmentsCodeFences = false
35+
#pygmentsUseClasses = false
3436
# Use the new Chroma Go highlighter in Hugo.
35-
pygmentsUseClassic = false
36-
pygmentsOptions = "linenos=table"
37+
#pygmentsUseClassic = false
38+
#pygmentsOptions = "linenos=table"
3739
# See https://help.farbox.com/pygments.html
38-
pygmentsStyle = "tango"
40+
#pygmentsStyle = "tango"
3941

4042
# Configure how URLs look like per section.
4143
[permalinks]
4244
blog = "/:section/:year/:month/:day/:slug/"
4345

4446
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
45-
[blackfriday]
46-
plainIDAnchors = true
47-
hrefTargetBlank = true
48-
angledQuotes = false
49-
latexDashes = true
47+
# NK - commented out everything related to BlackFriday, as we use Goldmark
48+
#[blackfriday]
49+
#plainIDAnchors = true
50+
#hrefTargetBlank = true
51+
#angledQuotes = false
52+
#latexDashes = true
5053

5154
# Image processing configuration.
5255
[imaging]
@@ -98,12 +101,21 @@ time_format_blog = "02.01.2006"
98101
section = ["HTML", "print"]
99102
# MvM - add line below to print every page
100103
page = ["HTML", "print"]
104+
# NK - add line below to output Algolia at root of /public
105+
home = ["Algolia"]
101106

102107
# MvM - add line below to activate production of RSS pages
103108
[outputFormats]
104109
[outputFormats.RSS]
105110
mediatype = "application/rss"
106111
baseName = "rss"
112+
# NK - Algolia outputFormats parameters
113+
[outputFormats.Algolia]
114+
baseName = "algolia" # specifies how to look for Hugo layout for this output format
115+
isPlainText = true # specifies GoLang’s plain text parser for the layout, preventing automatic HTML formatting in JSON
116+
mediaType = "application/json" # file output type
117+
notAlternative = true # excludes from looping over .AlternativeOutputFormats page variable
118+
107119

108120
[params]
109121
copyright = "The Docsy Authors"
@@ -212,4 +224,9 @@ enable = false
212224
name = "Developer mailing list"
213225
url = "https://example.org/mail"
214226
icon = "fa fa-envelope"
215-
desc = "Discuss development issues around the project"
227+
desc = "Discuss development issues around the project"
228+
229+
# NK - Algolia parameters to parse
230+
[params.algolia]
231+
vars = ["title", "summary", "content", "rawcontent", "date", "publishdate", "expirydate", "permalink"] # page parameters to include in index
232+
params = ["categories", "tags"] # custom page parameters to include in index

content/en/_index.md

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

0 commit comments

Comments
 (0)