diff --git a/website/Makefile b/website/Makefile index 0e83eb946..d7620d1c2 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,14 +1,24 @@ VERSION?="0.3.22" +build: + @echo "==> Starting build in Docker..." + @docker run \ + --interactive \ + --rm \ + --tty \ + --volume "$(shell pwd):/website" \ + hashicorp/middleman-hashicorp:${VERSION} \ + bundle exec middleman build --verbose --clean + website: @echo "==> Starting website in Docker..." @docker run \ - --interactive \ - --rm \ + --interactive \ + --rm \ --tty \ --publish "4567:4567" \ --publish "35729:35729" \ --volume "$(shell pwd):/website" \ hashicorp/middleman-hashicorp:${VERSION} -.PHONY: website +.PHONY: build website diff --git a/website/config.rb b/website/config.rb index cefa4dbcb..a62d25d85 100644 --- a/website/config.rb +++ b/website/config.rb @@ -8,6 +8,15 @@ activate :hashicorp do |h| end helpers do + # Returns the FQDN of the image URL. + # + # @param [String] path + # + # @return [String] + def image_url(path) + File.join(base_url, image_path(path)) + end + # Get the title for the page. # # @param [Middleman::Page] page diff --git a/website/source/assets/images/og-image.png b/website/source/assets/images/og-image.png new file mode 100644 index 000000000..4dd21039b Binary files /dev/null and b/website/source/assets/images/og-image.png differ diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index 9a18dddd2..f694ab007 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -14,6 +14,17 @@ + + + + + + + "/> + + + +