From a58f79f15aeab264d892f634f7693e37c7e74e42 Mon Sep 17 00:00:00 2001 From: Christian Nunciato Date: Tue, 25 Jun 2019 15:16:39 -0700 Subject: [PATCH 1/2] Add a robots.txt file This change adds a robots.txt template authorizing seach-engine indexing for all pages of the production site. It assumes that all non-production builds will override the `baseURL` configuration property with something other than `https://pulumi.com/`. Signed-off-by: Christian Nunciato --- config.toml | 3 ++- layouts/robots.txt | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 layouts/robots.txt diff --git a/config.toml b/config.toml index 0998e8150e7e..608cc86e019c 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "https://pulumi.io/" +baseURL = "https://pulumi.com/" languageCode = "en-us" title = "Pulumi" @@ -6,6 +6,7 @@ disableKinds = ["category", "taxonomyTerm"] sectionPagesMenu = "main" pygmentsCodeFences = true pygmentsUseClasses = true +enableRobotsTXT = true [outputFormats.RSS] baseName = "rss" diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 000000000000..8c069fc23cb0 --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +{{- /* baseURL is a template.URL, so we need to convert it before we compare it. */ -}} +{{- if ne (string .Site.BaseURL) "https://pulumi.com/" }} +Disallow: * +{{ end }} From 6957783b65242cf67ab490654cd6c210cfa019ac Mon Sep 17 00:00:00 2001 From: Christian Nunciato Date: Wed, 26 Jun 2019 09:13:43 -0700 Subject: [PATCH 2/2] Use www as the base URL Signed-off-by: Christian Nunciato --- config.toml | 2 +- layouts/robots.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 608cc86e019c..ceb0f0829130 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "https://pulumi.com/" +baseURL = "https://www.pulumi.com/" languageCode = "en-us" title = "Pulumi" diff --git a/layouts/robots.txt b/layouts/robots.txt index 8c069fc23cb0..2b8c485286d2 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,5 +1,5 @@ User-agent: * {{- /* baseURL is a template.URL, so we need to convert it before we compare it. */ -}} -{{- if ne (string .Site.BaseURL) "https://pulumi.com/" }} +{{- if ne (string .Site.BaseURL) "https://www.pulumi.com/" }} Disallow: * {{ end }}