Skip to content

Commit

Permalink
Merge branch 'main' into react-head-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesurowiec authored May 20, 2021
2 parents a86aef2 + afa551f commit dba7d5e
Show file tree
Hide file tree
Showing 34 changed files with 136 additions and 1,393 deletions.
1 change: 0 additions & 1 deletion feature-flags.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FEATURE_TEST_TRUE": true,
"FEATURE_TEST_FALSE": false,
"FEATURE_NEW_SITETREE": true,
"FEATURE_NEXTJS": false
}
37 changes: 0 additions & 37 deletions includes/all-articles-category.html

This file was deleted.

47 changes: 0 additions & 47 deletions includes/all-articles-product.html

This file was deleted.

12 changes: 0 additions & 12 deletions includes/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{%- if FEATURE_NEW_SITETREE -%}
<nav class="breadcrumbs f5" aria-label="Breadcrumb">
{%- for breadcrumb in breadcrumbs -%}
{%- if breadcrumb.href == '' -%}
Expand All @@ -8,14 +7,3 @@
{%- endif -%}
{%- endfor -%}
</nav>
{%- else -%}
<nav class="breadcrumbs f5" aria-label="Breadcrumb">
{%- for breadcrumb in breadcrumbs -%}
{%- if breadcrumb[1].href == '' -%}
<span>{{ breadcrumb[1].title }}</span>
{%- else -%}
<a title="{{ breadcrumb[0] }}: {{ breadcrumb[1].title }}" href="{{ breadcrumb[1].href }}" class="d-inline-block {% if breadcrumb[1].href == currentPath %}color-text-tertiary{% endif %}">{{ breadcrumb[1].title }}</a>
{%- endif -%}
{%- endfor -%}
</nav>
{%- endif -%}
82 changes: 0 additions & 82 deletions includes/sidebar-specific-product.html

This file was deleted.

4 changes: 0 additions & 4 deletions includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
</ul>
{% else %}
<ul class="sidebar-products">
{% if FEATURE_NEW_SITETREE %}
{% include sidebar-product %}
{% else %}
{% include sidebar-specific-product %}
{% endif %}
</ul>
{% endif %}
</nav>
Expand Down
10 changes: 0 additions & 10 deletions layouts/product-landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,12 @@ <h2 class="font-mktg h1 mb-2" id="guides-2"><a href="#guides-2">Guides</a></h2>
{% endif %}

<div class="container-xl px-3 px-md-6 mt-6">
{% if FEATURE_NEW_SITETREE %}
{% if page.documentType == "category" %}
{% include category-articles-list %}
{% endif %}
{% if page.documentType == "product" %}
{% include product-articles-list %}
{% endif %}
{% endif %}

{% unless FEATURE_NEW_SITETREE %}
{% if currentCategory %}
{% include all-articles-category %}
{% else %}
{% include all-articles-product %}
{% endif %}
{% endunless %}
</div>

{% include support-section %}
Expand Down
31 changes: 0 additions & 31 deletions lib/get-map-topic-content.js

This file was deleted.

8 changes: 2 additions & 6 deletions lib/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const assert = require('assert')
const path = require('path')
const cheerio = require('cheerio')
const patterns = require('./patterns')
const getMapTopicContent = require('./get-map-topic-content')
const getApplicableVersions = require('./get-applicable-versions')
const generateRedirectsForPermalinks = require('./redirects/permalinks')
const getEnglishHeadings = require('./get-english-headings')
Expand Down Expand Up @@ -102,7 +101,7 @@ class Page {
}

// if this is an article and it doesn't have showMiniToc = false, set mini TOC to true
if (!this.relativePath.endsWith('index.md') && !this.mapTopic) {
if (!this.relativePath.endsWith('index.md')) {
this.showMiniToc = this.showMiniToc === false
? this.showMiniToc
: true
Expand Down Expand Up @@ -169,10 +168,7 @@ class Page {
this.introLinks.overview = await renderContent(this.introLinks.rawOverview, context, { textOnly: true })
}

let markdown = this.mapTopic
// get the map topic child articles from the siteTree
? getMapTopicContent(this.parentProduct.id, context.siteTree, context.currentLanguage, context.currentVersion, context.currentPath)
: this.markdown
let markdown = this.markdown

// If the article is interactive parse the React!
if (this.interactive) {
Expand Down
10 changes: 10 additions & 0 deletions lib/schema-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const context = {
}

const pageSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand All @@ -129,6 +130,7 @@ const pageSchema = {
}

const exitSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand Down Expand Up @@ -175,6 +177,7 @@ const exitSchema = {
}

const linkSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand All @@ -196,6 +199,7 @@ const linkSchema = {
}

const searchSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand All @@ -220,6 +224,7 @@ const searchSchema = {
}

const navigateSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand All @@ -239,6 +244,7 @@ const navigateSchema = {
}

const surveySchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand Down Expand Up @@ -273,6 +279,7 @@ const surveySchema = {
}

const experimentSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand Down Expand Up @@ -304,6 +311,7 @@ const experimentSchema = {
}

const redirectSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand Down Expand Up @@ -331,6 +339,7 @@ const redirectSchema = {
}

const clipboardSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand All @@ -352,6 +361,7 @@ const clipboardSchema = {
}

const printSchema = {
type: 'object',
additionalProperties: false,
required: [
'type',
Expand Down
Loading

0 comments on commit dba7d5e

Please sign in to comment.