* fixed button wrapping behavior
previous+next buttons with long text now stack properly on smaller screens
* truncates function/component names of prev/next buttons
Function/component names are truncated, while regular titles are wrapped
* removed unused styles
* fixed using idx (safe getter) for previous/next titles
passed through prettier and all tests pass
* Adding last updated time for docs
* Making file path general and other suggested changes
* Checking if time returned is null due to absence of git or some other issue
* Adding option to enable/disable update time feature and test-doc
* Adding simple unit tests for getGitUpdateTime()
* nits & rewrote failing test
* consistent test naming
* Adding optional updateEnableTime in documentation
* package-lock & yarn.lock
* Fix conflicting strings issue in translations
* Preserve structure of `customTranslations`
* Use `deepmerge` to merge whole of `localized-strings`
* Simplify and make deep property access on an object safe
* Fix deep property accessor and rename it to idx
* Ensure Edit this Doc links always point to the master source of truth, and not a particular version
* Only show Edit this Doc link if editUrl has been set
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs
* Remove trailing-comma as we are using Node 6 on Circle
* Use latest Node 6 LTS version in Circle
* Remove unused test
* Add the ability to provide custom layout
When I designed the system, I added the ability to provide a custom layout that would use arbitrary JavaScript to render some custom pages. This is why files are called "DocsLayout.js", "BlogPostLayout.js"... This ability to customize it was [ripped out](https://github.com/facebook/react-native/blob/master/website/server/convert.js#L78) during the migration to Docusaurus but I need it for the project I'm working on right now (that should remain unnamed!).
This adds back the ability to do it in a way that fits the third party system. In order to provide a new layout:
1) Add a `layout` field in the header of your markdown file:
```js
---
layout: mylayout
---
```
2) In your `siteConfig`, add
```js
layouts: {
mylayout: function({React, Marked}) {
return class extends React.Component {
render() {
return React.createElement('div', {}, this.props.metadata.layout);
}
}
}
}
```
I think that it's a reasonable to add and would unblock me :)
* Update DocsLayout.js