index.js 738 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. *
  5. * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE.txt file in the root directory of this source tree.
  9. */
  10. import { Content } from '../../components';
  11. export default {
  12. path: '/',
  13. async action() {
  14. return new Promise((resolve, reject) => {
  15. require.ensure([], require => {
  16. try {
  17. const content = require('./index.md');
  18. resolve({
  19. title: content.title,
  20. component: Content,
  21. props: content,
  22. });
  23. } catch (err) {
  24. reject(err);
  25. }
  26. });
  27. });
  28. },
  29. };