Commit f9a8116a authored by Michel Salim's avatar Michel Salim Committed by Facebook GitHub Bot

Fix HTML document titles

Summary:
The document titles should be explicitly passed, otherwise pandoc generates a warning and tries to guess

Before:
```
folly/folly/docs on  master
❯ make Format.html
/usr/bin/pandoc -s -H style.css -f markdown -t html --toc -o Format.html Format.md
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'Format' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".

folly/folly/docs on  master
❯ make index.html
/usr/bin/pandoc -s -H style.css -f markdown -t html --toc -o index.html *.md
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'AtomicHashMap' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
```

After:
```
folly/folly/docs on  fix-docs [!]
❯ make Format.html
/usr/bin/pandoc -s -H style.css -f markdown -t html --toc -o Format.html Format.md --metadata title="folly/Format.h"

folly/folly/docs on  fix-docs [!]
❯ make index.html
/usr/bin/pandoc -s -H style.css -f markdown -t html --toc -o index.html *.md --metadata title="Folly API Documentation"
```

Reviewed By: danobi

Differential Revision: D24546374

fbshipit-source-id: 818e6ce39f361695a5f94c7662953062ea2f2868
parent fa7945b1
...@@ -20,13 +20,13 @@ html: $(HTML) ...@@ -20,13 +20,13 @@ html: $(HTML)
$(PANDOC) -f markdown -o $*.pdf $*.md $(PANDOC) -f markdown -o $*.pdf $*.md
%.html: %.md style.css %.html: %.md style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $*.html $*.md $(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $*.html $*.md --metadata title="$(shell head -n1 $*.md | sed -e 's|`||g')"
docs.md: $(SOURCES) style.css docs.md: $(SOURCES) style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t markdown --toc -o $@ *.md $(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t markdown --toc -o $@ *.md
index.html: $(SOURCES) style.css index.html: $(SOURCES) style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $@ *.md $(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $@ *.md --metadata title="Folly API Documentation"
clean: clean:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment