You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - I'm trying to use this tool to publish a README.md to our enterprise Confluence. At the top of my README.md, I have the following:
<!-- confluence-parent-id: 421855570 -->
<!-- confluence-page-id: 445939968 -->
<!-- confluence-space-key: NWP -->
<!-- generated-by: Do not edit. This page was auto-generated from the pipeline repo. -->
When I run md2conf README.md, the confluence-space-key does not get picked up, I get an error:
md2conf.properties.ConfluenceError: Confluence space key not specified
I have to specify the space key as an environment variable, CONFLUENCE_SPACE_KEY.
I traced through the code and it appears as though if the environment variable is not set, the markdown is not checked for 'confluence-space-key'.
Some of the document properties are deferrable. For example, a page doesn't need to have an explicit parent, it is enough if it gets assigned a parent (explicitly, or via a root page ID, or via inheritance from an ancestor) at the time content is generated. If the page is evaluated in a context where it has to have a parent (e.g. when exporting a directory hierarchy), and it turns out that it does not, a run-time error is raised.
Other document properties are overridable but not deferrable. For example, Confluence space key is a required parameter that you must set at the time the conversion is triggered. The value you set via the configuration options is the default Confluence space that you can in turn override in Markdown documents. If you don't override, the default space key is automatically applied. This ensures that all documents have a Confluence space key, and a run-time error due to missing space key is never triggered.
Confluence space key could be made a deferrable property with some changes to the code. However, you can emulate the behavior if you set a dummy space key in environment variables. This is how unit and integration tests work in md2conf, they use an otherwise meaningless dummy space key.
It would be nice if the space key as specified in the document is used instead of having to explicitly set one when running md2conf. Using a dummy space key is fine, but is confusing. Right now I'm setting the space key, both in the document and the environment, but find this duplicative.
Hi - I'm trying to use this tool to publish a README.md to our enterprise Confluence. At the top of my README.md, I have the following:
When I run md2conf README.md, the confluence-space-key does not get picked up, I get an error:
md2conf.properties.ConfluenceError: Confluence space key not specified
I have to specify the space key as an environment variable, CONFLUENCE_SPACE_KEY.
I traced through the code and it appears as though if the environment variable is not set, the markdown is not checked for 'confluence-space-key'.
I also noticed in
md2conf/md2conf/properties.py
Line 50 in 52af6dc
that self.space_key = opt_space_key is done 3 times in a row.
The text was updated successfully, but these errors were encountered: