Skip to content

Commit d818c9f

Browse files
committed
restore old hidden docs implementation
1 parent 9f10fdd commit d818c9f

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
node_modules
55
npm-debug.log
66
coverage
7+
content/early-access
8+
content/early-access-test
79

810
# blc: broken link checker
911
blc_output.log
1012
blc_output_internal.log
11-
dist
13+
dist

crowdin.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ files:
22
- source: /content/**/*.md
33
translation: /translations/%locale%/%original_path%/%original_file_name%
44
ignore: [
5-
"/content/README.md"
5+
"/content/README.md",
6+
"/content/early-access"
67
]
78
- source: /data/**/*.yml
89
translation: /translations/%locale%/%original_path%/%original_file_name%
@@ -22,4 +23,4 @@ project_id_env: CROWDIN_PROJECT_ID
2223
api_token_env: CROWDIN_PERSONAL_TOKEN
2324

2425
# https://support.crowdin.com/configuration-file-v3/#saving-directory-structure-on-server
25-
preserve_hierarchy: true
26+
preserve_hierarchy: true

data/ui.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ header:
1818
product_in_progress:
1919
👋 Hello, explorer! This page is under active development. For the
2020
most up-to-date and accurate information, please visit our <a href="https://developer.github.com">developer documentation</a>.
21+
early_access:
22+
👋 This page contains content about an early access feature. Please do not share this URL publicly.
2123
search:
2224
need_help: Need help?
2325
placeholder: Search topics, products...

includes/header.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
{% elsif currentLanguage == 'en' and site.data.ui.header.notices.flags.product_in_progress == true %}
1616
{% assign header_notification_type = "product_in_progress" %}
1717
{% assign header_notification = site.data.ui.header.notices.product_in_progress %}
18+
19+
{% elsif page.hidden %}
20+
{% assign header_notification_type = "early_access" %}
21+
{% assign header_notification = site.data.ui.header.notices.early_access %}
1822
{% endif %}
1923

2024
{% if header_notification %}

lib/algolia/find-indexable-pages.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module.exports = async function findIndexablePages () {
55
const indexablePages = allPages
66
// exclude pages that are part of WIP products
77
.filter(page => !page.parentProduct || !page.parentProduct.wip)
8+
// exclude hidden pages
9+
.filter(page => !page.hidden)
810
// exclude index homepages
911
.filter(page => !page.relativePath.endsWith('index.md'))
1012

lib/frontmatter.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ const schema = {
3838
mapTopic: {
3939
type: 'boolean'
4040
},
41-
// The `hidden` frontmatter property is no longer used, but leaving it here
42-
// with an enum of `[false]` will help us catch any possible regressions.
41+
// allow hidden articles under `early-access`
4342
hidden: {
44-
type: 'boolean',
45-
enum: [false]
43+
type: 'boolean'
4644
},
4745
layout: {
4846
type: ['string', 'boolean'],

0 commit comments

Comments
 (0)