docs.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. const Docma = require('docma');
  2. const Package = require('./package');
  3. Docma.create()
  4. .build({
  5. app: {
  6. title: Package.name,
  7. base: '/',
  8. entrance: 'content:readme',
  9. routing: 'query',
  10. server: Docma.ServerType.GITHUB,
  11. },
  12. markdown: {
  13. gfm: true,
  14. tables: true,
  15. breaks: false,
  16. pedantic: false,
  17. sanitize: false,
  18. smartLists: false,
  19. smartypants: false,
  20. tasks: false,
  21. emoji: true,
  22. },
  23. src: [
  24. { readme: './README.md' },
  25. { snekfetch: './src/index.js' },
  26. ],
  27. dest: './docs',
  28. jsdoc: {
  29. plugins: ['jsdoc-dynamic'],
  30. },
  31. template: {
  32. options: {
  33. title: Package.name,
  34. navItems: [
  35. {
  36. label: 'Readme',
  37. href: '?content=readme',
  38. },
  39. {
  40. label: 'Documentation',
  41. href: '?api=snekfetch',
  42. iconClass: 'ico-book',
  43. },
  44. {
  45. label: 'GitHub',
  46. href: Package.homepage,
  47. target: '_blank',
  48. iconClass: 'ico-md ico-github',
  49. },
  50. ],
  51. },
  52. },
  53. })
  54. .catch(console.error); // eslint-disable-line no-console