Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird displaying of .md files #385

Open
Andre601 opened this issue Jul 17, 2020 · 4 comments
Open

Weird displaying of .md files #385

Andre601 opened this issue Jul 17, 2020 · 4 comments

Comments

@Andre601
Copy link

Andre601 commented Jul 17, 2020

Orchid has some interesting display of both Markdown files and Javadocs

Markdown

Issues I found so far:

  • Reference Links ([text]: https://example.com) are not handled and display as is on the page.
    This is caused by having <!-- comment lines --> above the reference links.
  • Codeblocks don't display any syntax highlighting, even when a syntax type is provided.

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

@Andre601 Andre601 changed the title Generated pages display Linked classes without any spaces around them Weird displaying of .md files Jul 17, 2020
@cjbrooks12
Copy link
Contributor

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
Copy link
Author

Andre601 commented Jul 17, 2020

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
Copy link
Contributor

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
Copy link
Author

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

  • Having a Wiki subpage that links to Methods and Deprecated but no real way to link to the main wiki page
  • Have Methods and Deprecated as their own respective menu option, but still no main Wiki page link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants