Commit graph

33 commits

Author SHA1 Message Date
Bartosz Kaszubowski
92729af0ab
chore(v2): fix lint, tweak lqip-loader utils comment (#2563) 2020-04-09 01:08:58 +08:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code (#2320)
* chore: yearless copyright headers for source code

* update snapshots
2020-02-25 23:12:28 +08:00
James McShane
e4eb9194fa fix(v1): update blog href value to match navbar href (#2204) 2020-01-11 13:19:01 +08:00
Dan Abramov
632e2dc437 fix(v1): fix JSX highlighting by passing language to Prism (#2196)
* Fix JSX highlighting by passing language to Prism

* Make Prettier happy

* Keep guessing what Prettier wants because CI doesn't tell me
2020-01-08 00:42:47 +08:00
Yangshun Tay
55e676cb25
misc: add command to run prettier on docs (#2102)
* misc: add command to run prettier on docs

* Fix GH issue template

* Fix tests

* Add prettier-docs command to precommit
2019-12-07 21:56:30 -08:00
Yangshun Tay
0984dfcde5 fix(v1): apply negative margin to docs heading only (#2028) 2019-11-22 12:14:31 +07:00
Endi
bd68dce667
fix(v1): markdown content and toc should render the same (#2022)
* fix(v1): autogenerated_toc and sidebar toc should render the same

* revert test docs

* yarn.lock
2019-11-21 12:04:07 +07:00
Endi
e544dc960a
fix(v1): consistent slug & hash-link generation (#2019) 2019-11-20 23:35:47 +07:00
PA
1bf590ea2b fix(v1): fix page title render issue when referred by search result (#1869)
* 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
2019-11-18 11:07:02 -08:00
endiliey
ab1520548d chore: bump dependencies 2019-11-01 01:25:10 +07:00
Yangshun Tay
a690d34af0
feat(v1): allow specifying meta desc in front matter (#1859)
* feat(v1): allow specifying meta desc in front matter

* misc(v2): sync with v1
2019-10-20 11:17:10 -07:00
Endi
d96b5f99b9 fix(v2): swizzle should receive correct load context (#1844)
* fix(v2): swizzle should receive correct load context

* new prettier version

* niits
2019-10-16 08:56:09 -07:00
Emelia Smith
250a818e7f feat(v1): strip html from TOC (#1762)
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: '&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt; <em>Foo</em>',
  children: []
}
```

closes issue #1703
2019-09-13 14:57:22 -07:00
Endi
e1eea7b493
fix: dont render html for meta description (#1672) 2019-07-18 18:20:04 +07:00
Parth Patel
db44eccac3 fix: replace apostrophe with empty string in header slugification (#1618)
* 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.
2019-06-21 17:40:04 -07:00
Yangshun Tay
49cfdeb42b feat: make blog posts unlisted only in production 2019-06-15 10:32:43 -07:00
Ólafur Páll Geirsson
da3c91373e feat: add "unlisted" front matter option for blog posts (#1396)
* 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".
2019-06-15 09:24:15 -07:00
Shawn Tabrizi
b1023aa9ac fix: remove the Container component from the docsNavContainer (#1599)
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.
2019-06-13 09:05:41 -07:00
Tushar Sharma
9514593d5f feat: highlight nav item in onPageNav ToC (#1524)
* feat: highlight nav item in onPageNav ToC

* fix: use es5 in browser scripts, update documentation, css refactoring

* fix: removes smooth scroll

* fix: removes unnecessary codeblock , undo css formatting issues, modify scrip load url

* fix: update scrollspy script comments
2019-05-30 08:54:47 -07:00
Yangshun Tay
ef1af0a5be
fix: don't collapse the blog navigation even if collapsible is true (#1519)
* fix: don't collapse the blog navigation even if collapsible is true

* fix: read docsSideNavCollapsible from props
2019-05-26 20:37:58 -07:00
Hongarc
382b88bb49 fix: mobile navigation should show deepest breadcrumb instead of outermost (#1493) 2019-05-19 16:13:39 +07:00
Hongarc
1587810e8f fix: wrong url in next/prev button in some cases (#1488) 2019-05-18 13:29:13 +07:00
Sakti Kr Chourasia
084a49819f fix: h3 topics with Markdown formatting causes a glitch on mobile (#1467)
* fixed h3 topics with Markdown formatting causes a glitch on mobile

* replaced currenttarget to headings for if check

* use var instead of es6
2019-05-18 12:57:57 +07:00
Endi
f84abfe2d1
fix: right TOC should not strip special chars (#1458)
* fix: right TOC should not strip special chars

* nits
2019-05-14 23:55:35 +07:00
Yangshun Tay
64fdafbcea fix: replace use of deepmerge with _.merge (#1430) 2019-05-02 22:00:28 +07:00
Zach Badgett
0813920349 refactor: refactor code tab split (#1369)
* refactor: refactor code tab split

* Add split tab unit test

* Fix code tab list bug
2019-05-01 20:57:13 -07:00
Roland Balogh
195e934858 feat: change icon for navToggle (#1394) 2019-04-26 09:50:41 -07:00
Nathaniel Tucker
c1026516e1 fix: prism syntax highlight .tsx properly (#1391) 2019-04-25 20:42:10 +07:00
Endilie Yacop Sucipto
d51f2c9f92
fix: anchors links for underscore character (#1309) 2019-03-25 16:54:23 +07:00
Endilie Yacop Sucipto
1f91d19a8c
chore: move to monorepo (#1297)
* 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
2019-03-23 14:21:36 +07:00