entity("Must specify a markdown file.").build()ĭef homeDirectory = ScriptRunnerImpl.getOsgiService(ClusterHomeLocatorService).sharedHomeDirĭef markdownFiles = new File(homeDirectory, "markdown-files/")ĭef file = new File(markdownFiles, fileName)īoolean pathIsCanonical = file.path = file.canonicalPathīoolean fileIsMarkdown =. the markdown being processed truncates the link after news/ and the generated html tag gets an id attribute with 1000203176. Import .ĭef fileName = queryParams.getFirst("filename") as String For example, you may have a network file share on your Confluence server where permitted users add Markdown documents. You may have Markdown files in places that can’t be accessed over HTTP that you still want to render in Confluence. The nice thing about Markdown is that it plays so well with straight HTML - so I was pleased to get it working on the first try. These come in handy when you have a long post and want to link to different sections of a document for easy navigation. The following image is an example of the red mark that could display on an incoming link based on firewall settings: I wasn’t sure how to use anchor links in Markdown. The Markdown macro does not require incoming whitelisting, so this should not become a problem. The file layout you use determines the URLs that are used for the generated pages. For that, you could use a wildcard expression rule like *.Ĭonfluence’s whitelist tester may still display a red mark for the incoming URLs depending on your company’s firewall settings. Your documentation source should be written as regular Markdown files.
You may want to be more restrictive and, for example, only allow data from your company’s Bitbucket project. Linked Atlassian applications are whitelisted by default, but you’ll likely want to whitelist common Markdown sources such as these: Relative references are resolved using the URLs defined in the Server Object as a. This is necessary in order to prevent Server Side Request Forgery (SSRF) vulnerabilities. fields are noted as supporting CommonMark markdown formatting. If the Confluence whitelist is disabled, you cannot use URLs with the Markdown macro at all, but inline Markdown still works.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |