![]() Or you can use the content box on the page: Markdown from a URLĪdd your URL to the URL field, and click save. Then paste your macro into the content box: Entering Markdown Directly In-PageĬhoose the Markdown macro in the Confluence macro page: ![]() You can pull markdown from Bitbucket, from a URL, or through direct entry. > This is an infoĪlternatively, using a custom Markdown syntax also works: ~? This is an info. This could potentially harm your formatting.īlock quotes in Markdown are rendered as information macros. Warning: Any blockquotes used will implement an information macro. Will be replaced by confluence "toc" macro leading to something like: Table of Content true disc 7 1 list clear. If present, what is between the doctoc anchor format: The code blocks will be converted to the Confluence Code Block macro and also supports syntax highlighting. The images are uploaded as attachments and the references updated in the HTML. Standard markdown syntax for images and code blocks will be automatically converted. ![]() In the case of this document, the page would be called: Markdown to Confluence Converter. The original markdown to HTML conversion is performed by the Python markdown library.Īdditionally, the page name is taken from the first line of the markdown file, usually assumed to be the title. This may be need if the database doesn't support emojies Markdown Use -remove-emojies to emove emojies if there are any. Use -title to set the title for the page, otherwise the title is going to be the first line in the markdown file onlyĬonverting the markdown document to confluence format. Use -s or -simulate to stop processing before interacting with confluence API, i.e. instead of Use -l or -loglevel to specify a different logging level, i.e DEBUG. Use -n or -nossl to specify a non-SSL url, i.e. Obviously this won't work if it doesn't already exist. Use -d or -delete to delete the page instead of create it. Use -a or -ancestor to designate the name of a page which the page should be created under. Use -h to view a list of all available options. md TST -u basil -p abc123 -o fawltytowers Mandatory Confluence parameters can also be set here if not already set as environment variables: For the following examples assume 'Test Space' with key: TST. The minimum accepted parameters are the markdown file to upload as well as the Confluence space key you wish to upload to. On Windows, this can be set via system properties. add to your ~/.profile or ~/.bash_profile on Mac OS): export CONFLUENCE_USERNAME = 'basil' export CONFLUENCE_API_KEY = 'abc123' export CONFLUENCE_ORGNAME = 'fawltytowers' These can be specified at runtime or set as Confluence environment variables If the organization name contains a dot, it will be considered as a Fully Qualified Domain Name.įor example the URL: would indicate an organization name of. You will also need the organization name that is used in the subdomain.įor example the URL: would indicate an organization name of fawltytowers. To use it, you will need your Confluence username, API key and organisation name. Required python dependencies can be installed using: pip3 install -r requirements. Make the virtualenv active: > source venv / bin / activate Dependencies Or in Anaconda conda create -name md_to_conf python=3.7 -yes The project code and dependencies can be used based on python virtualenv.Ĭreate a new python virtualenv: > python3 -m venv venv Then a page will be created in the space or if it already exists, the page will be uploaded. ![]() The file will be converted into HTML or Confluence storage markup when required. It handles inline images as well as code blocks.Īlso there is support for some custom markdown tags for use with commonly used Confluence macros. A script to import a named markdown document into Confluence. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |