* fix(v1): Fix page title render issue when referred by search result
When Algolia DocSearch query finds a match for a page's title, it attempts to generate
a permalink. Because the page title element (`h1`) does not have an `id`, Algolia
generates uses the `id` from closes parent element. Because of this, the page title
scrolls to a position that is slightly overlayed by the fixed top navigation bar.
This fix sets an `id` for the page title so that the search result is able to generate
a more accurate permalink.
* Adjust css for handling post title to be on the top when referred by an anchor
The post title can sometimes be referred by an anchor using the "id" of that element.
In that case the title will be automatically be the first element within the viewport.
Since we have a header fixed at the top of the view port, the title becomes hidden or
not visible. That's why some css adjustments are needed so that if any user ends up
with a link to a page that is referring to the post title (i.e. auto generated anchor
link by algolia DocSearch).
The css code uses pseudo element `:before` to make the adjustments. Details on this
can be found in the following article:
https://css-tricks.com/hash-tag-links-padding/
* Adjust CSS so that different selectors are on separate lines
The approach here is to first strip the HTML from the heading's content, then rendered it with markdown to get the HTML content for the TOC entry, then to strip the HTML from the rendered content again, as to get the text for the TOC entry's link.
Adds an additional dependency of striptags (MIT licensed)
Example TOC Entry, given the heading of:
```markdown
```
```javascript
{
hashLink: 'foo',
rawContent: '<a name="foo"></a> _Foo_',
content: '<em>Foo</em>',
children: []
}
```
Previously this TOC entry would be:
```javascript
{
hashLink: 'a-name-foo-a-_foo_',
rawContent: '<a name="foo"></a> _Foo_',
content: '<a name="foo"></a> <em>Foo</em>',
children: []
}
```
closes issue #1703
* Replace apostrophe with empty string in header
This change is to replicate the github behviour with respect to apostrophe in
headers. When there is an apostrophe in a header, github replaces it with empty string
when creating an anchor link to that header. Docusaurus should follow the same convention.
* Add `unlisted` header option for blog posts, fixes#1393.
Previously, the blog sidebar listed the most recent blog posts sorted by
their publish date. This commit adds the ability to hide a specific blog
post from the sidebar and the feed of all blog posts by adding the
`unlisted: true` header option.
```md
title: My Draft Post
unlisted: true # Hide from blog sidebar and main blog page feed.
---
```
* Rename "unlisted" into "draft".
In this case, the `docsNavContainer` does not pick up any styles or attributes from the `container` component it is wrapped in.
It does however pick up the pesky `.container` className, which when paired with bootstrap, messes up the styling of the top navigation in mobile.
This change is completely non-destructive, but helps enable the use of bootstrap on top of Docusaurus.
* chore: move to monorepo
* lint all js file
* simplify circleCI
* fix failing tests
* fix tests due to folder rename
* fix test since v1 website is renamed