ref: 034d92ce14251297c41f68cfbf7e37df5fe80d0f sr.ht-docs/markdown/index.md -rw-r--r-- 1.1 KiB
034d92ceDrew DeVault Add YAMl frontmatter to all pages 2 years ago

#title: Markdown on sourcehut

Across the site, sr.ht uses a consistent Markdown syntax based on Python's Markdown package, which implements John Gruber's original Markdown specification.

We then post-process the HTML to strip out unwanted tags and attributes.


  • a
  • abbr
  • acronym
  • b
  • blockquote
  • code
  • div
  • dd
  • dl
  • dt
  • em
  • h1, h2, h3, h4, h5
  • i
  • img
  • input
  • li
  • ol
  • p
  • pre
  • span
  • strong
  • table
  • tbody
  • thead
  • td
  • th
  • tr
  • ul


We allow the id attribute on h* tags and the class attribute on all tags - the only permitted values of class are:

  • row
  • col-md-*
  • form-control

You may also specify the style tag, for which you may specify the following attributes:

  • margin
  • padding
  • text-align
  • font-weight
  • text-decoration

input elements may specify type='checkbox' as well as the checked attribute.

a tags may specify href and title.

abbr and acronym tags may specify title.