Hello All, 


I have a fairly involved question that I'm looking for advice on. I posted 
this on stackoverflow but I don't know what the action is like for 
questions regarding sphinx in docutils. 


I would like to code up a directive/extension so that I can render some 
custom structured content.

For example let's say I wanted to author a developer profile like...

.. profile::
   :name: Uber Hack
   :email: [email protected]
   :image: profile_images/uber.jpg

   Uber has been working with us for more than a decade, she can likely code 
circles
   around most mortals. You can't reach her on on `Facebook 
<http://facebook.com`_ , 
   and she'll gladly block you `Twitter <http://twitter.com>`_. She'll gladly 
troll 
   you on `Hacker News <http://news.ycombinator.com/user?id=ubergoddess>`_ 
though. 

The best example I could find was this extension for embedding 
youtube<https://bitbucket.org/birkenfeld/sphinx-contrib/src/77ad93846d24/youtube/sphinxcontrib/youtube.py>
 videos.

I can grab the options in the code just fine and I can probably figure out 
how to pass them off to a jinja2 template,

I guess I have 2 challenges.

   1. how would I take the image option and render it as an image node?(not 
   sure if that's the correct terminology)
   2. how would I get the rendered representation of the content?


I've read through the extension tutorial(
http://sphinx.pocoo.org/ext/tutorial.html) but what I want to do seems a 
little more involved than what's covered there.

Any help here, or on SO is greatly appreciated.  

http://stackoverflow.com/questions/10156737/directive-for-custom-structured-content

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sphinx-dev/-/dWqMMDRLLMYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to