avaje / website-source

Source for the website documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Many "typos"

Mechite opened this issue · comments

Small issue - there tends to be small issues with the way text is output to the HTML.
For example, in quick.ftl#L84, which looks like this:
Javalin.create(cfg -> routes.forEach(cfg.plugins::register)).start();
the output omits the J, giving us this on the deployed website:
image
May have something to do with indentation, etc.

a few other "issues" i spotted

  • OpenAPI/Javadoc - that argument deserves a name, RequestModel model: image
  • Validator [end of docs] - closing bracket is indented, but isn't in the source: image

At the end of the day this doesn't matter but I wonder why the output gets skewed a little.
If there is an FTL formatter out there, it can probably fix the problems if that is all it is

edit:

i've also a question.
image
In this case, <Plugin> should be parsed as a HTML element, and we should get an error, but we don't?
This is all nitpicking but we should use &lt; and &gt;.
I will make these maintenance changes in a PR when I make time

edit 2:

seems like #45 addresses a lot of it

So I guess it is worth reiterating since #45 fixes some of this:
The only thing in my original post that seems to remain is the List<Plugin> inside of the template.

This should be parsed as a HTML element but it seems like when compiling the template, it emits &lt; and &gt nicely. Is this a FTL feature, or simply an error being ignored, or something else? There are a lot of instances where we have a similar thing with angled brackets everywhere and they all seem to compile just fine.

I won't make a PR unless someone can confirm that it is a good idea for me to stick &gt; and &lt; into the source code for "future proofing"

This should be parsed as a HTML element but it seems like when compiling the template, it emits < and &gt nicely.

Yup, that is what it is supposed to do.

Is this a FTL feature, or simply an error being ignored, or something else?

This is a function of the avaje website builder. It detects chunks of code (Java, Kotlin, XML etc) and sends that to a plugin to translate the code into html and then inlines that into the final html.

stick > and < into the source code for "future proofing"

The desire is that source code snippets SHOULD be in appropriate <pre content="java"> blocks and the code snippets SHOULD have literal < and > (and @) - we expect to just copy n paste source code as is. We should NOT encode the source code snippets into &gt; etc.

Awesome! If I get time to review documentation (which I will when I'm out and about) I'll continue to submit PRs down the line for any corrections that can be made.