abuse-godoc.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Abuse godoc to write notes.
  2. Why
  3. The markup is unnoticeable, notes are written in plain text.
  4. No need to write or configure a static site generator.
  5. I can just use `go doc`.
  6. Push it to Bitbucket, GitHub, Launchpad, etc,
  7. and the doc is automatically available on godoc.org.
  8. The style and layout is clean on godoc.org.
  9. With JavaScript turnned on,
  10. readers can use a few simple keyboard shortcuts
  11. (type `?` for the list).
  12. With JavaScript turnned off,
  13. the page looks the same.
  14. And the page is viewable on a console browser,
  15. which supports none of JavaScript, CSS, and images.
  16. As an alternative to a console browser,
  17. readers can also clone the repository,
  18. and view and search notes via the `go doc` command line.
  19. Or access the plain text version of godoc.org:
  20. curl -H 'Accept: text/plain' https://godoc.org/github.com/icock/comp/about
  21. Comments can be sent as a pull request or an issue.
  22. This can be done via command line, GUI client, or web.
  23. A lot of SCM hosting services allow editing files on the web directly.
  24. If the hosting does not allow this,
  25. readers can use an online IDE.
  26. If I do not want to use godoc.org,
  27. or any of GitHub, BitBucket, Launchpad, etc.,
  28. I can also build the pages via `go doc` on my machine,
  29. then deploy it on any static site hosting services.
  30. Why Not
  31. HTML is used to be a markup for linkable documents.
  32. JavaScript is used to be a small language to add some decorative widgets to web site.
  33. And now they have been abused to build complex GUI applications.
  34. RSS is used to deliver news.
  35. Soon it has been abused to deliver full text of articles.
  36. Unlike one-time news,
  37. articles may be modified later.
  38. And RSS can either ignore announcing the updated version,
  39. or redeliver the new version of whole article.
  40. It does not have the mechanism to deliver the diff.
  41. Editors are used for editing text files.
  42. Later they have been abused as IDEs.
  43. Things tend to be abused.
  44. So why not?
  45. Not Have to Be Go
  46. It dose not have to be Go.
  47. Other languages supporting API doc can be used.
  48. However, a lot of documentation generation tools use a two-column layout by default,
  49. which may not suitable for notes.
  50. Thus it may require additional configuration or customization.
  51. */
  52. package about