From db6b2f6637dd2a91d9fc692e6a6f37763afb8fe3 Mon Sep 17 00:00:00 2001
From: Simon Marlow <smarlow@meta.com>
Date: Mon, 27 Jan 2025 05:57:00 -0800
Subject: [PATCH] For internal docs, omit the intro sections

Summary:
The intro sections are primarily aimed at open-source users and don't
make much sense for internal users, so let's just omit them from the
internal docs.

Differential Revision: D68629651

fbshipit-source-id: fd96ee5f890ff18f06df3c255694afa2e8fbbae5
---
 glean/website/docs/introduction.md | 15 +++++++++++++++
 glean/website/docs/walkthrough.md  | 29 ++++++++++++++++++++++++++---
 glean/website/sidebars.js          | 24 ++++++++++++++++--------
 3 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/glean/website/docs/introduction.md b/glean/website/docs/introduction.md
index d047eab2a..4d800710d 100644
--- a/glean/website/docs/introduction.md
+++ b/glean/website/docs/introduction.md
@@ -7,6 +7,21 @@ sidebar_label: Introduction
 import {OssOnly, FbInternalOnly} from 'internaldocs-fb-helpers';
 import {SrcFile,SrcFileLink} from '@site/utils';
 
+<FbInternalOnly>
+
+This is the Glean documentation. It describes all aspects of the
+system, including how to write queries and schemas, and how
+to use the included command-line tools. Use the navigation on the left
+to find all the sections.
+
+If you found yourself here by mistake, go back to the
+  main [Glean Wiki](https://www.internalfb.com/wiki/Glean/).
+
+
+</FbInternalOnly>
+
+## Overview
+
 Glean is a system for working with facts about source code. It is
 designed for collecting and storing detailed information about code
 structure, and providing access to the data to power tools and
diff --git a/glean/website/docs/walkthrough.md b/glean/website/docs/walkthrough.md
index a2eece365..4c5fae101 100644
--- a/glean/website/docs/walkthrough.md
+++ b/glean/website/docs/walkthrough.md
@@ -6,14 +6,26 @@ sidebar_label: Walkthrough
 
 import {OssOnly, FbInternalOnly} from 'internaldocs-fb-helpers';
 
+<OssOnly>
+
 We can play with Glean using the [shell](shell.md). You can do this
 directly from the [Docker image](trying.md) if you want, or [Build Glean
 from source](./building.md) first.
 
+</OssOnly>
+
+<FbInternalOnly>
+
+We can play with Glean using the [shell](shell.md).
+
+</FbInternalOnly>
+
 To try experiments we can work with a local schema definition and
 local database (as opposed to connecting to a Glean server).  If you
 want to play along with the examples, you can do so as follows:
 
+<OssOnly>
+
 ```lang=sh
 mkdir /tmp/glean
 mkdir /tmp/glean/db
@@ -28,10 +40,21 @@ data](https://github.com/facebookincubator/Glean/blob/master/glean/example/facts
 in `/tmp/glean/facts.glean`. Then reload schema and create a database from the example
 data using `:reload` and `:load <file>` in the shell:
 
+</OssOnly>
+
+<FbInternalOnly>
+
+```lang=sh
+cd fbcode
+glean shell --db-root /tmp/glean --schema glean/example/schema
+```
+
+Then create a database from the example data with `:load <file>` in the shell:
+
+</FbInternalOnly>
+
 ```lang=sh
-> :reload
-reloading schema [2 schemas, 7 predicates]
-> :load /tmp/glean/facts.glean
+> :load glean/example/facts.glean
 facts>
 ```
 
diff --git a/glean/website/sidebars.js b/glean/website/sidebars.js
index b622e3007..56dd77cc5 100644
--- a/glean/website/sidebars.js
+++ b/glean/website/sidebars.js
@@ -11,13 +11,21 @@
 const {fbContent, fbInternalOnly} = require('internaldocs-fb-helpers');
 
 module.exports = {
-  someSidebar: {
-       'Quick Start': [
-           'introduction',
-           'trying',
-           'building',
-           'walkthrough',
-       ],
+  someSidebar: [
+      'introduction',
+      ...fbContent({
+          internal: [
+              'walkthrough',
+          ],
+          external: [{
+              'Quick Start': [
+                  'trying',
+                  'building',
+                  'walkthrough',
+              ]
+          }],
+      }),
+      {
        'User Guide': [
            {
                'Schemas': [
@@ -94,4 +102,4 @@ module.exports = {
            },
        ],
   },
-};
+]};