Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into add-note-docker-architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
sicarul authored Sep 22, 2023
2 parents c353341 + 072e6d5 commit 67df465
Show file tree
Hide file tree
Showing 791 changed files with 34,262 additions and 14,393 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=14
ARG NODE_VERSION=18
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}

ARG VARIANT=hugo
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"args": {
"VARIANT": "hugo",
"VERSION": "0.96.0",
"NODE_VERSION": "16",
"NODE_VERSION": "18",
"GO_VERSION": "1.16.9"
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docs
/themes/default/content/docs @susanev @sean1588 @anita-trimbur
/themes/default/content/docs @interurban @cnunciato

# blog
/themes/default/content/blog @cnunciato @scottslowe
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Add issues to project
on:
issues:
types:
- opened
- reopened
jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- name: Add to Docs
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/pulumi/projects/79
github-token: ${{ secrets.PULUMI_BOT_GHA_MARKETING }}
13 changes: 13 additions & 0 deletions .github/workflows/add-triage-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add triage label to new issues
on:
issues:
types:
- opened
- reopened
jobs:
add-triage-label:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: needs-triage
6 changes: 4 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: "16.x"
node-version: "18.x"

- name: Install Go
uses: actions/setup-go@v2
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.96.0"
hugo-version: "0.111.0"
extended: true

- name: Check out branch
Expand All @@ -46,3 +46,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_APP_SEARCH_KEY: ${{ vars.ALGOLIA_APP_SEARCH_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: "16.x"
node-version: "18.x"

- name: Install Go
uses: actions/setup-go@v2
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.96.0"
hugo-version: "0.111.0"
extended: true

- name: Check out branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: "16.x"
node-version: "18.x"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
18
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ yarn-error.log
.hugo_build.lock
*.md

themes/default/layouts/partials/assets.html
themes/default/theme
themes/default/assets
themes/default/layouts
6 changes: 0 additions & 6 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
"trailingComma": "all",
"useTabs": false,
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
},
{
"files": ["*.yml", "*.yaml"],
"options": {
Expand Down
2 changes: 1 addition & 1 deletion BLOGGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ gifsicle ./my-animation.gif --resize-width=1200 --optimize=3 --batch

## Done? Submit!

When you're ready to submit your post for review, issue a Pull Request against the `master` branch of the repo, and the team will have a look. Once merged — provided its `date` has passed the post will be deployed to https://www.pulumi.com/.
When you're ready to submit your post for review, issue a Pull Request against the `master` branch of the repo, and the team will have a look. Once merged, the post will be deployed to https://www.pulumi.com/.

## Publicize your blog

Expand Down
53 changes: 33 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We build the Pulumi website statically with Hugo, manage our Node.js dependencie

* [Go](https://golang.org/) (>= 1.15)
* [Hugo](https://gohugo.io) (>= 0.92)
* [Node.js](https://nodejs.org/en/) (>= 1.14)
* [Node.js](https://nodejs.org/en/) (>= 18)
* [Yarn](https://classic.yarnpkg.com/en/) (1.x)

### VS Code devcontainer
Expand Down Expand Up @@ -121,38 +121,51 @@ The behavior in this case is no different than if you'd allowed the job to run o

Interested in writing a blog post? See the [blogging README](BLOGGING.md) for details.

## Style Guide

We try and align Pulumi documentation to the [Pulumi Docs Style Guide](STYLE-GUIDE.md).
## Search

## Shortcodes and web components

We use number of Hugo shortcodes and web components in our pages. You can read more about many of them in the [components README](https://github.com/pulumi/theme/tree/master/stencil).
We use [Algolia](https://www.algolia.com/) for search, and we update the Algolia search index [on every deployment](https://github.com/pulumi/docs/blob/master/scripts/ci-push.sh#L13) of the website. Whether you're adding a new page or updating an existing one, your changes will be reflected in search results within a few seconds of release.

## Search and Swiftype
### Creating findable content

Swiftype is how we manage our search experience for docs and Registry. The [Swiftype docs](https://swiftype.com/documentation/site-search/site_search) have a lot of useful information. A few items to keep in mind if you are updating search results or behavior:
We currently index every page of the website, including the blog and the Registry. However, we do not index all of the content of every page — we only index certain properties of the page. These include:

### Swiftype console
* Page titles (specifically the `title` and `h1` frontmatter params)
* Page descriptions (specifically the `meta_desc` param)
* Second-level headings (e.g., those prefixed with `##` in Markdown files)
* Keywords, if any (via the `search.keywords` param)
* Authors, if any (via the `authors` param)
* Tags, if any (via the `tags` param)

Visit the [Swiftype console](https://app.swiftype.com/) for information specific to our search implementation: the date and time of the most recent crawl, any customizations we have done of result rankings for specific search terms, synonyms we have set for specific search terms, or weighting of custom meta tags.
Because of this, it's important to be thoughtful about the terms you use for these fields, especially titles, keywords, descriptions, and H2 headings. If you want your content to be findable by specific terms, you must make sure those terms exist in one or more of the fields listed above.

### Result rankings
For example, if you were writing a guide to building an ETL pipeline with Redshift, and you wanted to make sure the page would be surfaced for queries like `redshift data warehouse etl`, you might construct the page's frontmatter in the following way:

[Swiftype rankings](https://swiftype.com/documentation/site-search/guides/result-rankings) let us manually customize how results appear for any query. Using the console, you can enter a query, and pin certain results to the top or delete results.
```yaml
title: Build an ETL pipeline with Redshift and AWS Glue
meta_desc: Learn how to combine AWS Glue and Amazon Redshift to build a fully-automated ETL pipeline with Pulumi.
search:
keywords:
- data warehouse
```
In this case, the optional `search.keywords` field is included to cover the terms `data warehouse`, as those terms don't exist in the page's title or description. If it weren't, queries for `data warehouse` would fail to match this particular page.

### Fields, meta tags, and weights
Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the [search app in pulumi/docs](https://github.com/pulumi/docs/blob/master/scripts/search/settings.js).

Fields are the set of places where the crawler extracts content from our pages. There are a set of default fields (title, body, etc). We can add fields by [adding custom meta tags](https://swiftype.com/documentation/site-search/crawler-configuration/meta-tags), either in the head or the body of a document. It's worth noting that these are different than SEO meta tags, and the crawler does not capture those meta tags. Once a custom field is added and has been re-crawled (about a day after code has been merged), we can use the field to adjust results using weights.
### Keeping pages out of search results

[Swiftype weights](https://swiftype.com/documentation/site-search/guides/weights) are a way for us to impact search result relevance, by telling the engine that matches in a certain field of the document matter more than matches elsewhere. In the Swiftype console, we can adjust the weights of any field. By giving a certain field more weight, we can affect the ranking of search results.
To keep a page from showing up in search results (including on Google, etc.), use the `block_external_search_index` frontmatter parameter:

### Synonyms
```yaml
title: My page
...
block_external_search_index: true
```

[Swiftype synonyms](https://swiftype.com/documentation/site-search/guides/synonyms) allow us to connect common search terms to each other. If we know some users refer to a provider as “ReallyAwesome,” but our docs use the name “RA”, we can set those as synonyms in our Swiftype console. This will ensure that users get the same set of results using either term, and that those results are relevant regardless of which name we use in our docs.
## Style Guide

We try and align Pulumi documentation to the [Pulumi Docs Style Guide](STYLE-GUIDE.md).

### UI and Layout
## Shortcodes and web components

Swiftype is opinionated about the layout of search results, search behavior, and the UI styling of the search box. Within the Swiftype console, we can [customize elements](https://swiftype.com/documentation/site-search/guides/design-and-customization) such as the style of search results, the result count per page, or text colors. In order to override the search input styles (text color, border styles, etc) we need to directly update our styles for the `st-default-search-input` class.
We use number of Hugo shortcodes and web components in our pages. You can read more about many of them in the [components README](https://github.com/pulumi/theme/tree/master/stencil).
2 changes: 2 additions & 0 deletions config/_default/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ security:
- PULUMI_CONVERT_URL
- PULUMI_AI_WS_URL
- GITHUB_TOKEN
- ALGOLIA_APP_ID
- ALGOLIA_APP_SEARCH_KEY

disableKinds:
- category
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ replace github.com/pulumi/pulumi-hugo/themes/default => ./themes/default

require (
github.com/pulumi/pulumi-hugo/themes/default v0.0.0-20220504042409-82f5a4588c0e // indirect
github.com/pulumi/registry/themes/default v0.0.0-20230607135252-ae809144de47 // indirect
github.com/pulumi/registry/themes/default v0.0.0-20230921205947-0a318837c88a // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github.com/pulumi/pulumi-hugo/themes/default v0.0.0-20220504042409-82f5a4588c0e/go.mod h1:081/gGTOxNFBjrLQ3QvsyP34iiWgmmKDtoi5falfsuo=
github.com/pulumi/registry/themes/default v0.0.0-20230607135252-ae809144de47 h1:3//pYA8QkeC9w7MLt1X300q8BOogOt0J3ANFTg1Cms0=
github.com/pulumi/registry/themes/default v0.0.0-20230607135252-ae809144de47/go.mod h1:QSvobZqmJMqVmn3BTfSiYkbRKtJHhSA8gotu/pD1a0w=
github.com/pulumi/registry/themes/default v0.0.0-20230921205947-0a318837c88a h1:1DXTV0qrU8AvlKXGp2AAdSUYPk3gXrikU3tUgv1Nelc=
github.com/pulumi/registry/themes/default v0.0.0-20230921205947-0a318837c88a/go.mod h1:QSvobZqmJMqVmn3BTfSiYkbRKtJHhSA8gotu/pD1a0w=
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"devDependencies": {
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.6.2",
"prettier-plugin-go-template": "^0.0.13"
"prettier": "^2.6.2"
},
"scripts": {
"prepare": "husky install"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint/lint-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const markdownlint = require("markdownlint");
const path = require("path");

/**
* REGEX for grabbing the the front matter of a Hugo markdown file. Example:
* REGEX for grabbing the front matter of a Hugo markdown file. Example:
*
* ---
* ...props
Expand Down
60 changes: 26 additions & 34 deletions themes/default/archetypes/blog-post/index.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,54 @@
---
title: "{{ replace .Name "-" " " | title }}"

# The date represents the post's publish date,
# and by default corresponds with the date this file was generated.
# Posts with future dates are visible in development,
# but excluded from production builds.
# Use the time and timezone-offset portions of of this value
# to schedule posts for publishing later.
# The date represents the post's publish date, and by default corresponds with
# the date and time this file was generated. Dates are used for display and
# ordering purposes only; they have no effect on whether or when a post is
# published. To influence the ordering of posts published on the same date, use
# the time portion of the date value; posts are sorted in descending order by
# date/time.
date: {{ .Date }}

# Use the meta_desc property to provide a brief summary
# (one or two sentences) of the content of the post,
# which is useful for targeting search results or social-media previews.
# This field is required or the build will fail the linter test.
# Max length is 160 characters.
# The draft setting determines whether a post is published. Set it to true if
# you want to be able to merge the post without publishing it.
draft: false

# Use the meta_desc property to provide a brief summary (one or two sentences)
# of the content of the post, which is useful for targeting search results or
# social-media previews. This field is required or the build will fail the
# linter test. Max length is 160 characters.
meta_desc:

# The meta_image appears in social-media previews and on the blog home page.
# A placeholder image representing the recommended format, dimensions and aspect ratio
# has been provided for you.
# The meta_image appears in social-media previews and on the blog home page. A
# placeholder image representing the recommended format, dimensions and aspect
# ratio has been provided for you.
meta_image: meta.png

# At least one author is required.
# The values in this list correspond with the `id` properties
# of the team member files at /data/team/team.
# Create a file for yourself if you don't already have one.
# At least one author is required. The values in this list correspond with the
# `id` properties of the team member files at /data/team/team. Create a file for
# yourself if you don't already have one.
authors:
- joe-duffy

# At least one tag is required.
# Lowercase, hyphen-delimited is recommended.
# At least one tag is required. Lowercase, hyphen-delimited is recommended.
tags:
- change-me

# See the blogging docs at https://github.com/pulumi/pulumi-hugo/blob/master/BLOGGING.md.
# for additional details,
# and please remove these comments before submitting for review.
# See the blogging docs at https://github.com/pulumi/pulumi-hugo/blob/master/BLOGGING.md
# for details, and please remove these comments before submitting for review.
---

What you put here will appear on the index page.
In most cases, you'll also want to add a Read More link after this paragraph
(though technically, that's optional).
To do that, just add an HTML comment like the one below.
What you put here will appear on the index page. In most cases, you'll also want to add a Read More link after this paragraph (though technically, that's optional. To do that, just add an HTML comment like the one below.

<!--more-->

And then everything _after_ that comment will appear on the post page itself.

Either way, avoid using images or code samples
[in the first 70 words](https://gohugo.io/content-management/summaries/#automatic-summary-splitting) of your post,
as these may not render properly in summary contexts (e.g., on the blog home page or in social-media previews).
Either way, avoid using images or code samples [in the first 70 words](https://gohugo.io/content-management/summaries/#automatic-summary-splitting) of your post, as these may not render properly in summary contexts (e.g., on the blog home page or in social-media previews).

## Writing the Post

For help assembling the content of your post,
see [BLOGGING.md](https://github.com/pulumi/pulumi-hugo/blob/master/BLOGGING.md).
For general formatting guidelines,
see the [Style Guide](https://github.com/pulumi/pulumi-hugo/blob/master/STYLE-GUIDE.md).
For help assembling the content of your post, see [BLOGGING.md](https://github.com/pulumi/pulumi-hugo/blob/master/BLOGGING.md). For general formatting guidelines, see the [Style Guide](https://github.com/pulumi/pulumi-hugo/blob/master/STYLE-GUIDE.md).

## Code Samples

Expand Down
2 changes: 1 addition & 1 deletion themes/default/archetypes/video-transcript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ meta_desc: "Search Description"
featured: false

pre_recorded: true
pulumi_tv: true
pulumi_tv: false
unlisted: false

# Gated videos will have a registration form
Expand Down
Loading

0 comments on commit 67df465

Please sign in to comment.