You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # OpenKF's docs
  2. OpenKF's docs are built with [hugo](https://gohugo.io/), and can be browsed live at https://kind.sigs.k8s.io/
  3. To browse them locally, install hugo and run `make serve` from this directory.
  4. Read [tutorial](https://getdoks.org/docs/overview/introduction/), learning to use OpenKF document construction
  5. ## File Directory Description
  6. | Directory | Description |
  7. | ---------- | ------------------------------------------------------------ |
  8. | archetypes | Directory for creating new content files with Hugo command. |
  9. | assets | Directory for storing files that need to be processed by Hugo Pipes. |
  10. | config | Directory for storing configuration directives in JSON, YAML, or TOML format. |
  11. | content | Directory for storing all the content of your website. Each top-level folder is considered a content section. |
  12. | data | Directory for storing configuration files that can be used by Hugo during website generation. |
  13. | layouts | Directory for storing template files specifying how to render content views in the static website. |
  14. | static | Directory for storing all static content such as images, CSS, JavaScript, etc. |
  15. | resources | Directory for caching files to speed up the generation process. |
  16. ## Command
  17. > **Note**💡:
  18. > You can change the commands in the scripts section of `./package.json`.
  19. ### create
  20. Create new content for your site:
  21. ```bash
  22. npm run create [path] [flags]
  23. ```
  24. See also the Hugo docs: [hugo new](https://gohugo.io/commands/hugo_new/).
  25. ### Docs based tree
  26. Create a docs based tree — with a single command:
  27. ```bash
  28. npm run create -- --kind docs [section]
  29. ```
  30. For example, create a docs based tree named guides:
  31. ```bash
  32. npm run create -- --kind docs guides
  33. ```
  34. ## lint
  35. Check scripts, styles, and markdown for errors:
  36. ```bash
  37. npm run lint
  38. ```
  39. ### scripts
  40. Check scripts for errors:
  41. ```bash
  42. npm run lint:scripts [-- --fix]
  43. ```
  44. ### styles
  45. Check styles for errors:
  46. ```bash
  47. npm run lint:styles [-- --fix]
  48. ```
  49. ### markdown
  50. Check markdown for errors:
  51. ```bash
  52. npm run lint:markdown [-- --fix]
  53. ```
  54. ## clean
  55. Delete temporary directories:
  56. ```bash
  57. npm run clean
  58. ```
  59. ## start
  60. Start local development server:
  61. ```bash
  62. npm run start
  63. ```
  64. ## build
  65. Build production website:
  66. ```bash
  67. npm run build
  68. ```
  69. ### functions
  70. Build Lambda functions:
  71. ```bash
  72. npm run build:functions
  73. ```
  74. ### preview
  75. Build production website including draft and future content:
  76. ```bash
  77. npm run build:preview
  78. ```