Closed praveenweb closed 5 years ago
Building static HTML failed for path "/"
See our docs page for more info on this error: https://gatsby.dev/debug-html
5 | import Link from "../link";
6 |
> 7 | const TreeNode = ({className = '', setCollapsed, collapsed, url, title, items, location = document.location, ...rest}) => {
| ^
8 | const isCollapsed = collapsed[url];
9 | const collapse = () => {
10 | setCollapsed(url);
WebpackError: ReferenceError: document is not defined
@i001962 - Thanks for pointing out. Builds failed obviously because document is available only on the client and not during build phase. Fixed it via https://github.com/hasura/gatsby-gitbook-starter/commit/0c4d89437e509270a711cf90d8ba8a83a084a01f
The highlighting of active element on the left sidebar doesn't seem to work. It's probably an issue with URL matching that ends without slashes.