Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7658535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:12:52+00:00 2026-05-31T13:12:52+00:00

How could I customize placeholders in my .rst file with actual values? For example,

  • 0

How could I customize placeholders in my .rst file with actual values?

For example, I have example.rst file with following content:

Header
------------------------------------ 
${custom_text}

I want to replace ${custom_text} property with the value this is the value of custom property by running following command:

rst2html example.rst -o example.html -Dcustom_text="this is the value of custom property"

Also I wonder whether it is possible to customize template using .properties file? For example, I would like to run rst2html example.rst -o example.html -p example.properties command using example.properties file with following content:

custom_text=this is the value of custom property

Is it possible? Does reStructuredText support template features at all?

EDIT: Please note that I want to customize template from command line or using conventional .properties file (can be used by Ant/Maven build management tool).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:12:53+00:00Added an answer on May 31, 2026 at 1:12 pm

    Substitution in reStructuredText files is performed using the replace directive. For example:

    I am using |RST|.
    
    .. |RST| replace:: reStructuredText
    

    will result in the text

    I am using reStructuredText.

    You could use the include directive to define a list of substitution templates in a separate file. For example, given the following two files:

    example.rst:

    Header
    ======
    
    .. Include templates from external file (this is a comment).
    .. include:: properties.rst
    
    I can include text, like |my custom text|, from other files.
    

    properties.rst

    .. |my custom text| replace:: "example text"
    

    will result in the document:

    Header

    I can include text, like “example text”, from other files.

    Here I have used the command rst2html.py example.rst to generate the HTML output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have an customize email after the registration in my community builder,
Could somebody please do a rundown of how to programmatically encrypt a config-file in
Could anybody explain in plain words how Cloud computing works? I have read the
I want to reinject singleton-scoped dependencies into prototype Spring beans, after they have been
I have subclassed QComboBox to customize it for special needs. The subclass is used
I have the following code to show <iframe src=http://www.facebook.com/plugins/like.php?href=[mySite] scrolling=no frameborder=0 style=border:none; width:170px; height:80px></iframe>
I usually customize existing colorscheme to meet my needs. If I could get the
I have a set of 1000 pdf in my server. Now, i want to
I'm trying to customize the UIImagePickerController for iPhone right now. I could modify the
I've implemented a resource dictionary so that I could customize my tooltip on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.