Skip to content

Commit

Permalink
Replace Sentinel intro with tutorials (#2580)
Browse files Browse the repository at this point in the history
* replace intro with tutorials

* add tutorials the right way for sentinel

* remove intro page

* fix ci tests
  • Loading branch information
im2nguyen authored Sep 26, 2024
1 parent 13ff652 commit 24b378a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ export function getNavItems(currentProduct: ProductData): NavItem[] {
* PR to publish Sentinel tutorials:
* https://github.com/hashicorp/tutorials/pull/2169
*/
if (currentProduct.slug !== 'sentinel') {
items.push({
label: 'Tutorials',
url: `/${currentProduct.slug}/tutorials`,
})
}
items.push({
label: 'Tutorials',
url: `/${currentProduct.slug}/tutorials`,
})

/**
* Documentation categories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ export const generateProductLandingSidebarMenuItems = (
}

// Add a "Tutorials" link for all products
if (product.slug !== 'sentinel') {
menuItems.push({
title: 'Tutorials',
fullPath: `/${product.slug}/tutorials`,
})
}
menuItems.push({
title: 'Tutorials',
fullPath: `/${product.slug}/tutorials`,
})

// Add "Documentation" item links for all products
menuItems.push(...docsItems)
Expand Down
18 changes: 9 additions & 9 deletions src/content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ The `"get_started"` block renders a heading, descriptive text, and a single link

Example: Waypoint `"get_started"` block

```json5
```json
{
type: 'get_started',
product: 'waypoint',
heading: 'Introduction to Waypoint',
text: 'Welcome to Waypoint! This introduction section covers what Waypoint is, the problem Waypoint aims to solve, and how Waypoint compares to other software.',
link: {
text: 'Get Started',
url: '/waypoint/docs/intro',
},
"type": "get_started",
"product": "waypoint",
"heading": "Introduction to Waypoint",
"text": "Welcome to Waypoint! This introduction section covers what Waypoint is, the problem Waypoint aims to solve, and how Waypoint compares to other software.",
"link": {
"text": "Get Started",
"url": "/waypoint/docs/intro"
}
}
```

Expand Down
8 changes: 4 additions & 4 deletions src/content/sentinel/install-landing.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"subtitle": "Sentinel is a policy as code tool that lets you control what users of HashiCorp products are allowed to do. It enforces policies proactively, preventing end users from deploying changes that are not allowed.",
"featuredDocsLinks": [
{
"href": "/sentinel/intro/why",
"href": "/sentinel/docs/why",
"text": "Why Sentinel?"
},
{
"href": "/sentinel/intro/getting-started",
"text": "Getting Started"
"href": "/sentinel/tutorials/get-started",
"text": "Get started"
},
{
"href": "/sentinel/docs/commands",
"text": "CLI Commands"
"text": "CLI commands"
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions src/content/sentinel/product-landing.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"body": "Sentinel is a policy as code tool that lets you control what users of HashiCorp products are allowed to do. It enforces policies proactively, preventing end users from deploying changes that are not allowed.",
"cta": {
"text": "Learn more",
"url": "/sentinel/intro/what"
"url": "/sentinel/docs/what"
},
"image": {
"light": "https://www.datocms-assets.com/2885/1707422837-devdot-sentinel_lm.png",
Expand All @@ -21,7 +21,7 @@
"ctas": [
{
"text": "Quick Start",
"url": "/sentinel/intro/getting-started"
"url": "/sentinel/tutorials/get-started"
},
{
"text": "Language Documentation",
Expand All @@ -42,17 +42,17 @@
{
"heading": "Infrastructure",
"body": "Use HCP Terraform with Sentinel to check that infrastructure will comply with policies.",
"url": "https://developer.hashicorp.com/terraform/tutorials/policy/sentinel-install"
"url": "/terraform/tutorials/policy/sentinel-install"
},
{
"heading": "Security",
"body": "Use Vault with Sentinel to control who can access secrets based on their role or the endpoint.",
"url": "https://developer.hashicorp.com/vault/tutorials/policies/sentinel"
"url": "/vault/tutorials/policies/sentinel"
},
{
"heading": "Applications",
"body": "Use Nomad with Sentinel to control jobs based on driver or other attributes of the job object.",
"url": "https://developer.hashicorp.com/nomad/tutorials/governance-and-policy/sentinel"
"url": "/nomad/tutorials/governance-and-policy/sentinel"
}
]
},
Expand Down
17 changes: 2 additions & 15 deletions src/data/sentinel.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@
]
},
"alertBannerActive": true,
"alertBanner": {
"tag": "HashiConf",
"url": "https://hashiconf.com/2023?utm_source=direct&utm_medium=banner&utm_campaign=23Q3_HASHICONFGLOBAL_EVENT&utm_content=&utm_offer=event",
"text": "Our community conference is taking place in San Francisco and online October 10-12.",
"linkText": "Register now",
"expirationDate": ""
},
"version": "0.18.6",
"subnavItems": [
{
Expand All @@ -48,19 +41,13 @@
"type": "inbound"
}
],
"basePaths": ["docs", "intro", "downloads"],
"basePaths": ["docs", "downloads"],
"rootDocsPaths": [
{
"basePathForLoader": "sentinel",
"iconName": "docs",
"name": "Docs",
"name": "Documentation",
"path": "docs"
},
{
"basePathForLoader": "sentinel/intro",
"iconName": "docs",
"name": "Intro",
"path": "intro"
}
]
}
15 changes: 0 additions & 15 deletions src/pages/sentinel/intro/[[...page]].tsx

This file was deleted.

0 comments on commit 24b378a

Please sign in to comment.