Skip to content

Commit

Permalink
add algolia (#8)
Browse files Browse the repository at this point in the history
* add algolia [wip]

* instantsearch styling

* fix search result styling and autohide

* fix search styling box on subpages

* do not use relative positioning

* css animations

* expand searchbar when searching

* fix dropshadow

* reduce transitions

* add indexing

* test MASTER_BRANCH

* Use non-tls scheme (temp)

* rename excerpt to description

* refine search

* fix base url

* fix search error if no search-results div

* restore true master branch

* remove .env

* fix mobile responsiveness

* hide broken subnav search dialog

* move HUGO_URL to pipeline general env

* add canonical link

* fix canonical link
  • Loading branch information
osterman authored May 11, 2018
1 parent e453330 commit 45fb67b
Show file tree
Hide file tree
Showing 301 changed files with 806 additions and 336 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
deploy.toml
test
test.toml
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export HUGO_CONFIG ?= config.toml
export HUGO_PUBLISH_DIR ?= public
export PACKAGES_VERSION ?= 0.1.7
export HTMLTEST_LOG_LEVEL ?= 2
export ALGOLIA_INDEX_FILE ?= $(HUGO_PUBLISH_DIR)/index.algolia.json
export ALGOLIA_APPLICATION_INDEX ?= dev
export ALGOLIA_API_ENDPOINT ?= "https://$(ALGOLIA_APPLICATION_ID).algolia.net/1/indexes/$(ALGOLIA_APPLICATION_INDEX)"
#export ALGOLIA_API_ENDPOINT ?= "https://httpbin.org/post"

-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)

Expand Down Expand Up @@ -57,3 +61,19 @@ release:
deploy:
aws s3 sync --delete --acl public-read --exact-timestamps $(HUGO_PUBLISH_DIR)/ s3://$(S3_BUCKET_NAME)/

## Update algolia search index
reindex:
rm -rf algolia/
mkdir -p algolia
jq -c .[] $(ALGOLIA_INDEX_FILE) | split -l 1 - algolia/
find algolia/ -type f -exec \
curl -X POST \
--connect-timeout 5 \
--max-time 10 \
--retry 5 \
--retry-delay 5 \
--retry-max-time 60 \
-H "X-Algolia-API-Key: $(ALGOLIA_API_KEY)" \
-H "X-Algolia-Application-Id: $(ALGOLIA_APPLICATION_ID)" \
-d '@{}' \
$(ALGOLIA_API_ENDPOINT) \;
23 changes: 17 additions & 6 deletions codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ version: '1.0'

steps:
init_variables:
title: Init variables
title: Initializing variables...
image: alpine
commands:
- cf_export MASTER_BRANCH=master
- cf_export BUILD_HARNESS_VERSION=0.5.5
- cf_export HUGO_URL=https://${{S3_BUCKET_NAME}}
- cf_export HUGO_CONFIG=deploy.toml

build:
title: Build Hugo static site
title: Building Hugo static site...
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ./
commands:
Expand All @@ -20,20 +20,31 @@ steps:
- make build

test:
title: Run tests
title: Running tests...
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ./
commands:
- make deps
- make smoketest

deploy:
title: Push all artifacts to S3 bucket
title: Pushing all artifacts to S3 bucket...
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ./
commands:
- make deploy
when:
condition:
all:
executeForMasterBranch: "'${{CF_BRANCH}}' == 'master'"
executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'"

reindex:
title: Updating algolia search index...
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ./
commands:
- make reindex
when:
condition:
all:
executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'"
30 changes: 20 additions & 10 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ enableEmoji = true
[params]
showVisitedLinks = true # default is false
themeStyle = "flex"
ordersectionsby = "weight" # ordersectionsby = "title"
ordersectionsby = "weight"
# ordersectionsby = "title"
disableHomeIcon = true
disableSearch = true
disableNavChevron = false # set true to hide next/prev chevron, default is false
Expand All @@ -42,58 +43,67 @@ isPlainText = true
mediaType = "application/json"
notAlternative = true

[mediaTypes]
[mediaTypes."application/algolia"]
suffix = "algolia.json"

[outputFormats.algolia]
isPlainText = true
mediaType = "application/algolia"
notAlternative = true

[outputs]
home = [ "HTML", "RSS", "JSON"]
home = [ "HTML", "RSS", "algolia"]

[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-book'></i> <label>Documentation</label>"
identifier = "documentation"
identifier = "nav-documentation"
url = "/"
weight = 10

[[menu.shortcuts]]
name = "<i class='fa fa-bullhorn'></i> <label>Announcements</label>"
identifier = "announcements"
identifier = "nav-announcements"
url = "/announcements/"
weight = 20

[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fab fa-github'></i> <label>Our GitHub</label>"
identifier = "github"
identifier = "nav-github"
url = "https://github.com/cloudposse/"
weight = 30

[[menu.shortcuts]]
name = "<i class='fa fa-bookmark'></i> <label>Blog</label>"
identifier = "blog"
identifier = "nav-blog"
url = "https://cloudposse.com/blog/"
weight = 40

[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-question'></i> <label>FAQ</label>"
identifier = "faq"
identifier = "nav-faq"
url = "/faq/"
weight = 45

[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-question'></i> <label>Support</label>"
identifier = "support"
identifier = "nav-support"
url = "https://github.com/cloudposse/docs/issues"
weight = 50

[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-edit'></i> <label>Ask a Question</label>"
identifier = "ask-a-question"
identifier = "nav-ask-a-question"
url = "https://github.com/cloudposse/docs/issues/new"
weight = 60

[[menu.shortcuts]]
name = "<i class='fa fa-envelope'></i> <label>Contact Us</label>"
url = "/documentation/contact-us/"
identifier = "contact-us"
identifier = "nav-contact-us"
weight = 70
1 change: 0 additions & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
title: Home
---


2 changes: 1 addition & 1 deletion content/announcements/_index.mb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Announcements"
icon: "fa fa-bullhorn"
head: "dude"
slug: announcements
---
Welcome to the developer hub and documentation for Cloud Posse! Here you'll find announcements pertaining to new projects, terraform modules, helm charts, and other offerings.

Expand Down
4 changes: 3 additions & 1 deletion content/announcements/aws-assumed-roles-repo-deprecated.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
title: "AWS Assumed Roles Repo Deprecated"
excerpt: "We've decided to deprecate our [`aws-assume-role`](https://github.com/cloudposse/aws-assumed-role) repo in favor of using [`aws-vault`](https://github.com/99designs/aws-vault) by 99 Designs."
description: "We've decided to deprecate our [`aws-assume-role`](https://github.com/cloudposse/aws-assumed-role) repo in favor of using [`aws-vault`](https://github.com/99designs/aws-vault) by 99 Designs."
publishDate: "2018-03-31 19:59:58"
tags:
- "aws-assumed-roles"
- "iam"
- "geodesic"
categories:
- announcements
---
We've decided to deprecate our [`aws-assume-role`](https://github.com/cloudposse/aws-assumed-role) repo in favor of using [`aws-vault`](https://github.com/99designs/aws-vault) by 99 Designs. This offers an outstanding, ultra-secure experience for working with IAM assumed roles for local development.

Expand Down
4 changes: 3 additions & 1 deletion content/announcements/new-major-release-of-geodesic.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
title: "New Major Release of Geodesic"
excerpt: "This release rips out the complicated dependencies on `Makefiles` that wrapped `helm` and `kops`. "
description: "This release rips out the complicated dependencies on `Makefiles` that wrapped `helm` and `kops`. "
publishDate: "2018-03-31 19:47:11"
tags:
- geodesic
- goofys
- aws-vault
categories:
- announcements
---
Geodesic is the fastest way to get up and running with a rock solid, production grade cloud platform leveraging best-of-breed Open Source tools.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: "Terraform Module to Manage IAM for Kops External DNS"
excerpt: "Terraform module to provision an IAM role for `external-dns` running in a Kops cluster, and attach an IAM policy to the role with permissions to modify Route53 recordsets."
description: "Terraform module to provision an IAM role for `external-dns` running in a Kops cluster, and attach an IAM policy to the role with permissions to modify Route53 recordsets."
publishDate: "2018-03-31 19:40:53"
categories:
- announcements
---


Expand Down
2 changes: 1 addition & 1 deletion content/aws/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: AWS Infrastructure
slug: "aws"
icon: "fab fa-aws"
excerpt: ''
description: ''
---


2 changes: 1 addition & 1 deletion content/aws/aws-well-architected-framework.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: AWS Well-Architected Framework
excerpt: ''
description: ''
---
2 changes: 1 addition & 1 deletion content/aws/cloudfront.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: CloudFront
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/cloudtrail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: CloudTrail
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/cloudwatch-logs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: CloudWatch Logs
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/ecs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ECS
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/iam/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: IAM
slug: "iam"
excerpt: ''
description: ''
draft: true
tags:
- iam
Expand Down
2 changes: 1 addition & 1 deletion content/aws/iam/assuming-roles.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: AWS IAM Assuming Roles
excerpt: ''
description: ''
draft: false
tags:
- iam
Expand Down
2 changes: 1 addition & 1 deletion content/aws/iam/authorization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: AWS IAM Authorization
excerpt: ''
description: ''
---

You can access AWS by Web console or AWS CLI.
Expand Down
2 changes: 1 addition & 1 deletion content/aws/iam/best-practices.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: AWS IAM Best Practices
slug: "best-practices"
excerpt: ''
description: ''
draft: false
tags:
- iam
Expand Down
2 changes: 1 addition & 1 deletion content/aws/kms.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: KMS
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/organizations/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: AWS Organizations
excerpt: ''
description: ''
tags:
- aws
- organizations
Expand Down
2 changes: 1 addition & 1 deletion content/aws/organizations/best-practices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: AWS Organizations Best Practices
excerpt: ''
description: ''
tags:
- organizations
- aws
Expand Down
2 changes: 1 addition & 1 deletion content/aws/rds.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: RDS
excerpt: ""
description: ""
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/route53/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Route53
excerpt: ''
description: ''
tags:
- aws
- route53
Expand Down
2 changes: 1 addition & 1 deletion content/aws/route53/best-practices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Route 53 Best Practices
excerpt: ''
description: ''
tags:
- dns
- aws
Expand Down
2 changes: 1 addition & 1 deletion content/aws/s3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: S3
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/ssm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: SSM
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/aws/vpc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: VPC
excerpt: ''
description: ''
draft: true
---
2 changes: 1 addition & 1 deletion content/contributors/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Contributors"
excerpt: ""
description: ""
icon: "fa fa-users"
---
{{% dialog type="info" icon="fa fa-info-circle" title="People" %}}
Expand Down
2 changes: 1 addition & 1 deletion content/contributors/andriy-knysh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Andriy Knysh"
excerpt: ""
description: ""
tags:
- "devops"
- "terraform"
Expand Down
2 changes: 1 addition & 1 deletion content/contributors/erik-osterman.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Erik Osterman"
excerpt: ""
description: ""
tags:
- "ceo"
- "founder"
Expand Down
Loading

0 comments on commit 45fb67b

Please sign in to comment.