Skip to content

Commit

Permalink
Merge pull request #552 from informalsystems/shon/emojify-docs
Browse files Browse the repository at this point in the history
Emojify docs
  • Loading branch information
Shon Feder authored Feb 8, 2021
2 parents 15f4a5e + 5c824af commit bf248ef
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,19 @@ jobs:
mdbook-version: "0.4.5"
# mdbook-version: 'latest'

- run: |
- name: Build the mdBook
run: |
set -x
cd docs
# Install emojitsu
wget --no-verbose https://github.com/shonfeder/emojitsu/releases/download/0.0.6/gh-actions-emojitsu
chmod +x gh-actions-emojitsu
# Emojify the markdown
find . -type f -name "*.md" -exec ./gh-actions-emojitsu emojify -i {} \;
# Build the book
mdbook build
# mdbook generates this file automatically but it breaks the gh-pages
# jekyll rendering we use for the base site
Expand Down
24 changes: 24 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ mdbook serve

## Notes on writing the documentation

### Emoji

We have hacked together support for _most_ GitHub emoji names in the docs. So,
if you write

```markdown
:duck:
```

then, after compiling in our CI during deployment, it will render as

```markdown
🦆
```

Our CI uses the [emojitsu](https://github.com/shonfeder/emojitsu#emojitsu) CLI
utility. You can also use this tool to lookup the name for an emoji if you have
the unicode on hand or to see how a name will render.

Note that GitHub cheats in it's rendering: it replaces emojinames with pngs, and
includes some emojis which are not supported by the unicode standard. We don't
stand for this standardless stuff at the moment, because it would be too tedious
to implement.

### The Table of Contents

The [./src/SUMMARY.md](./src/SUMMARY.md) specifies the table of contents shown
Expand Down
2 changes: 1 addition & 1 deletion docs/src/lang/logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ design. Maybe it returns the first element of the set? Sets are not ordered, so
there is no first element.

Why should you use `CHOOSE`? Actually, you should not. Unless you have no other
choice :bowtie:
choice :ribbon:

There are two common use cases, where the use of `CHOOSE` is well justified:

Expand Down

0 comments on commit bf248ef

Please sign in to comment.