Skip to content

Commit

Permalink
Implement glossary (#13)
Browse files Browse the repository at this point in the history
* Implement glossary

* use proper datatype for term

* more glossary work

* define cloudposse

* use term in sentence
  • Loading branch information
osterman authored May 6, 2018
1 parent f48e723 commit ba1850a
Show file tree
Hide file tree
Showing 12 changed files with 270 additions and 167 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ indent_size = 4
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2




3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ run:

## Generate all static content (outputs to public/)
build:
@$(HUGO)
rm -rf public/
$(HUGO)
6 changes: 6 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ highlightClientSide = false # set true to use highlight.pack.js instead of the d
menushortcutsnewtab = false # set true to open shortcuts links to a new tab/window
enableGitInfo = true

[outputFormats.glossary]
baseName = "glossary"
isPlainText = true
mediaType = "application/json"
notAlternative = true

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

Expand Down
9 changes: 9 additions & 0 deletions content/glossary/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Glossary"
slug: glossary
excerpt: "Glossary of definitions"
outputs:
- HTML
- RSS
- glossary
---
12 changes: 12 additions & 0 deletions content/glossary/aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: AWS
terms:
- "Amazon Web Services"
- "AWS"
- "aws cli"
- "awscli"
- "aws-cli"
excerpt: "Amazon Web Services"
---
Amazon Web Services is a public cloud offering from Amazon. It's also a command line tool (`aws`) use to control services running on the platform.

12 changes: 12 additions & 0 deletions content/glossary/cloudposse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Cloud Posse, LLC
terms:
- "cloudposse"
- "cloud posse"
- "cloud posse llc"
- "cloud posse, llc"
- "cloudposse, llc"
- "!cloudposse.com"
excerpt: "Cloud Posse is a DevOps professional services company"
---
Cloud Posse is a DevOps professional services company. Let us know how we can help. Reach us at <[email protected]>.
8 changes: 8 additions & 0 deletions content/glossary/infrastructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Infrastructure
terms:
- infrastructure
- !AWS Infrastructure
excerpt: "Infrastructure is everything that supports running your software"
---
Infrastructure is everything that supports running your software.
5 changes: 5 additions & 0 deletions layouts/_default/list.glossary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- $.Scratch.Add "glossary" slice -}}
{{ range $index, $element := .Data.Pages }}
{{- $.Scratch.Add "glossary" (dict "term" (delimit $element.Params.terms ", ") "description" ($element.Content|markdownify)) -}}
{{ end }}
{{- $.Scratch.Get "glossary" | jsonify -}}
Empty file removed static/.gitignore
Empty file.
2 changes: 1 addition & 1 deletion static/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$(function(){
$('.page').glossarizer({
sourceURL: '/js/glossary.json',
sourceURL: '/glossary.json',
callback: function(){
// Callback fired after glossarizer finishes its job
new tooltip();
Expand Down
42 changes: 0 additions & 42 deletions static/js/glossary.json

This file was deleted.

Loading

0 comments on commit ba1850a

Please sign in to comment.