Skip to content

Commit

Permalink
site: Add rel=author
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Dec 20, 2023
1 parent d34e0d7 commit a1db013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/content/index.dmark
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: D★Mark

#h D★Mark

#byline A project by %link[target=https://denisdefreyne.com]{Denis Defreyne}
#byline A project by %link[rel=author,target=https://denisdefreyne.com]{Denis Defreyne}

#p %b{D★Mark} is a language for marking up prose. It facilitates writing semantically meaningful text, without limiting itself to the semantics provided by HTML or Markdown. If you’re a technical writer looking for a flexible markup language, D★Mark might be a good fit.

Expand Down
4 changes: 3 additions & 1 deletion site/lib/dmark2html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def handle_element(element, context)
when 'note', 'todo'
wrap('div', class: element.name) { handle_children(element, context) }
when 'link'
wrap('a', href: element.attributes['target']) { handle_children(element, context) }
attrs = { href: element.attributes['target'] }
attrs['rel'] = element.attributes['rel'] if element.attributes['rel']
wrap('a', attrs) { handle_children(element, context) }
when 'listing'
wrap('pre') do
wrap('code') do
Expand Down

0 comments on commit a1db013

Please sign in to comment.