README 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. MarkGone a minimal markup language based on godoc
  2. MarkGone uses the minimal formatting syntax from godoc.
  3. Unlike godoc, MarkGone processes plain text, not comments in go source code;
  4. Philosophy
  5. Markups are gone.
  6. In other words, MarkGone text just looks like plain text.
  7. Formatting Syntax
  8. A heading is a single line
  9. followed by another paragraph,
  10. beginning with a capital letter,
  11. and containing no punctuation.
  12. Paragraphs are separated by one or more blank lines.
  13. To produce a pre-formatted blocks,
  14. simply indent every line of the block.
  15. Common indent prefix will be removed in output.
  16. http://example.com/urls_are_auto-linked
  17. Source Code HighLight
  18. MarkGone does not highlight pre-formatted blocks.
  19. The highlighting can be done via JavaScript.
  20. For example, with highlight.js:
  21. <link rel="stylesheet" href="/path/to/styles/default.css">
  22. <script src="/path/to/highlight.pack.js"></script>
  23. <script>
  24. document.addEventListener('load', () => {
  25. hljs.configure({languages: ["go", "c", "scheme", "java", "js", "html", "css"]});
  26. const codes = document.querySelectorAll('pre');
  27. codes.forEach((code) => { hljs.highlightBlock(code); });
  28. });
  29. </script>
  30. CSS
  31. Since markgone only uses four HTML elements
  32. h2, h3, p, pre
  33. customizing css style for it is simple.
  34. Sample css files are provided in the css directory of source code repository:
  35. []struct{
  36. filename string;
  37. description string;
  38. }{
  39. {"godoc.css":
  40. "mimic godoc style"},
  41. {"plain/blue-link":
  42. "mimic plain text with colored links"},
  43. {"plain/underline-link":
  44. "mimic plain text with underlined links"},
  45. {"plain/white-on-black":
  46. "mimic a console"},
  47. {"plain/green-on-black":
  48. "mimic a console with green text"},
  49. }
  50. Extensions
  51. If the first line is a single line, i.e. followed by a blank line,
  52. then MarkGone uses it as the title.
  53. Tags: space-separated tags on last line following at least one blank-line