SourceForge.net | 28 Aug 15:49
Favicon
Gravatar

[ docutils-Bugs-2080572 ] RFE: document links

Bugs item #2080572, was opened at 2008-08-28 09:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=422030&aid=2080572&group_id=38414

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matthew Leingang (leingang)
Assigned to: Nobody/Anonymous (nobody)
Summary: RFE: document links

Initial Comment:
Metadata is good.

Much in the same way that ReST authors can specify metadata that gets converted to HTML meta elements by
rst2html, they should be able to use document links as specified in

http://www.w3.org/TR/html4/struct/links.html#edef-LINK

One way to implement this would be a copy of the meta directive, with an interface something like

.. link:: 
   :next type=text/html: chapter3.html
   :next type=text/plain: chapter3.txt
   :previous type=text/html: chapter1.html
   :previous type=text/html dir=rev: chapter
   :index type=text/html: index.html 

producing in the HTML document

  <head>
    <link rel="next" type="text/html" href="chapter3.html" />
    <link rel="next" type="text/plain" href="chapter3.txt" />
    <link rel="previous" type="text/html" href="chapter1.html" />
    <link rev="previous" type="text/html" href="chapter3.html" />
    <link rel="index" type=text/html" href="index.html" />
  </head>

Types could be inferred from the URI by the writer, possibly.

Another possible interface could a new directive for each of the linktypes described in 

http://www.w3.org/TR/html4/types.html#type-links

such as:

.. link-next:: chapter3.html
   :type: text/html

.. link-next:: chapter3.txt
   :type: text/plain

.. link-previous:: chapter1.html

.. link-previous:: chapter3.html
   :direction: rev

.. link-alternate:: chapter2.pdf
   :type: application/pdf
   :media: print

This has the advantage of looking more like some of the other ReST metadata directives and less like a
duplication of HTML.

In this case, there should be a mechanism for defining custom linktypes, too.  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=422030&aid=2080572&group_id=38414

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane