orchidhq / Orchid

Build and deploy beautiful documentation sites that grow with you
https://orchid.run
GNU General Public License v3.0
512 stars 53 forks source link

Weird displaying of .md files #385

Open Andre601 opened 3 years ago

Andre601 commented 3 years ago

Orchid has some interesting display of both Markdown files and Javadocs

Markdown

Issues I found so far:

Javadoc

Links to packages, classes or similar that are set using {@link} don't keep spaces after and before the tag itself. In my case does Builder class to create an instance of {@link org.botblock.javabotblockapi.core.BotBlockAPI BotBlockAPI} become this: image

cjbrooks12 commented 3 years ago

Syntax highlighting is an opt-in feature (docs), and I actually never realized before now that it's not mentioned in the tutorial. I'll be sure to add a section for adding syntax highlighting.

Adding the following block into config.yml will enable it for you:

allPages:
  metaComponents:
    - type: 'prism'
      languages:
        - 'java'
        - 'groovy'
        - 'xml'

As for the markdown issue, I'm not sure why that's breaking. Its using flexmark to process markdown, which is supposed to be Commonmark-complient. Your readme renders fine when pasted into the online Commonmark viewer, so I'll have to dig in and see why Orchid's not handling it properly, and see if its something Orchid is doing to it, or an issue with the Flexmark library.

For the Javadoc @link tags, I don't think I've ever seen them in that syntax before, and I don't see any mentions of that syntax in the Javadoc reference guide or anywhere else online from a quick search. It doesn't seem like valid syntax given what I've seen about Javadoc (which, granted, isn't much). Are they actually being formatted as you expect when you run the normal Javadoc on them?

Andre601 commented 3 years ago

For the Javadoc @link tags, I don't think I've ever seen them in that syntax before, and I don't see any mentions of that syntax in the Javadoc reference guide or anywhere else online from a quick search. It doesn't seem like valid syntax given what I've seen about Javadoc (which, granted, isn't much). Are they actually being formatted as you expect when you run the normal Javadoc on them?

They are (I use dark reader here, but that has no influence on this) image

Is there by any chance a guide/page about all default config.yml settings that can be used? I don't talk about any specific setting that is only available from a extra plugin, but all settings that would be usable with just the core plugin itself.

cjbrooks12 commented 3 years ago

Hmm, then it seems to be some undocumented behavior of Javadoc. But I can get that fixed for you shortly.

There's not a single page with all these config.yml settings, but when viewing the site locally, http://localhost:8080/admin takes you to Orchid's Admin Panel. There's lots of helpful info for you in there, and it's all generated from the code running in your site, so it will always be up-to-date. This tutorial describes it a little more as well (some of the pics are a bit out of date, but the content should still be accurate).

Andre601 commented 3 years ago

I took a look at it, but still are a bit confused.

For example do I want to add a Wiki navigation section alongside the API Docs one, but the Plugin Docs don't give me a real clue about how I could achieve this. The only options I have here are