diff --git a/.gitignore b/.gitignore index e7bc933f8e81..4c960428f83a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,10 @@ node_modules npm-debug.log coverage +content/early-access +content/early-access-test # blc: broken link checker blc_output.log blc_output_internal.log -dist \ No newline at end of file +dist diff --git a/crowdin.yml b/crowdin.yml index ef80b4ec26fe..5f0cf63ee4e7 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -2,7 +2,8 @@ files: - source: /content/**/*.md translation: /translations/%locale%/%original_path%/%original_file_name% ignore: [ - "/content/README.md" + "/content/README.md", + "/content/early-access" ] - source: /data/**/*.yml translation: /translations/%locale%/%original_path%/%original_file_name% @@ -22,4 +23,4 @@ project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN # https://support.crowdin.com/configuration-file-v3/#saving-directory-structure-on-server -preserve_hierarchy: true \ No newline at end of file +preserve_hierarchy: true diff --git a/data/ui.yml b/data/ui.yml index 137d1f392d7e..222f23fedbf5 100644 --- a/data/ui.yml +++ b/data/ui.yml @@ -18,6 +18,8 @@ header: product_in_progress: 👋 Hello, explorer! This page is under active development. For the most up-to-date and accurate information, please visit our developer documentation. + early_access: + 👋 This page contains content about an early access feature. Please do not share this URL publicly. search: need_help: Need help? placeholder: Search topics, products... diff --git a/includes/header.html b/includes/header.html index 6a70c042484a..403797475a18 100644 --- a/includes/header.html +++ b/includes/header.html @@ -15,6 +15,10 @@ {% elsif currentLanguage == 'en' and site.data.ui.header.notices.flags.product_in_progress == true %} {% assign header_notification_type = "product_in_progress" %} {% assign header_notification = site.data.ui.header.notices.product_in_progress %} + + {% elsif page.hidden %} + {% assign header_notification_type = "early_access" %} + {% assign header_notification = site.data.ui.header.notices.early_access %} {% endif %} {% if header_notification %} diff --git a/lib/algolia/find-indexable-pages.js b/lib/algolia/find-indexable-pages.js index d3fb24408fdc..19822c3d52bc 100644 --- a/lib/algolia/find-indexable-pages.js +++ b/lib/algolia/find-indexable-pages.js @@ -5,6 +5,8 @@ module.exports = async function findIndexablePages () { const indexablePages = allPages // exclude pages that are part of WIP products .filter(page => !page.parentProduct || !page.parentProduct.wip) + // exclude hidden pages + .filter(page => !page.hidden) // exclude index homepages .filter(page => !page.relativePath.endsWith('index.md')) diff --git a/lib/frontmatter.js b/lib/frontmatter.js index f3e79a5325ba..fbe98324c99d 100644 --- a/lib/frontmatter.js +++ b/lib/frontmatter.js @@ -38,11 +38,9 @@ const schema = { mapTopic: { type: 'boolean' }, - // The `hidden` frontmatter property is no longer used, but leaving it here - // with an enum of `[false]` will help us catch any possible regressions. + // allow hidden articles under `early-access` hidden: { - type: 'boolean', - enum: [false] + type: 'boolean' }, layout: { type: ['string', 'boolean'],