Neopoligen Documentation TODO
TODO
Show how to make a new list based section including the corresponding item, parargarph, and single sections
Shorthand spans can have named_span spans in thier attr values, but not other shorthands.
Shorthand spans only process text in their main body. i.e. attempting to nest other shorthands or named_spans will result only in the actual characters showing up instead of being parsed into spans (this sentence could be worded better)
Link shorthand that you can do with or without text. If there's only one field it's used for both the text and the URL
Document all the shorthand codes
json5-simple-table
{ "header_rows": [ ["alfa", "bravo", "charlie"] ], "body_rows": [ [ "1.1", "1.2", "1.3" ], [ "2.1", "2.2", "3.3" ], [ "3.1", "3.2", "3.3" ], [ "4.1", "4.2", "4.3" ], ], "footer_rows": [ ["delta", "echo", "foxtrot"] ] }
json5-advanced-table - this exists, but you might be better off just making an HTML table directly instead
TODO: Pull example.
Documnet how the 404 error page is dynamic to show errors and isn't what goes out on the site.
Show how to use the date formatting for site.generated_at()
Go through all the macros
Point out how the output_section_with_tempalte is used for li for when there is only one block.
Show inline CSS
Show inline Scripts
Show inline HTML
Document how end sections are KIND-end
for the templates but fall back to generic-ends
so you don't have to make any of them
Note that there's currently no way to wrap end sections, but maybe do -- /pre/
in the future? That would be way down the road though.
Documnet that the reason for making HTML, CSS, and Script their own sections is for filtering when sending across the wire. (There's still other protections that need to be put in place, but this is part of the layered security approach)
Document that you can't nest shorthands. If you need nesting, do named_spans
Document the built-in-span-text
fallback tempalte for if nothing else matches.
Document that the underline shorthand is done with a span with an inline style since there isn't a specific element for just underlining text (the <u>
is for non-textual annotations which you can read more about on the MDN page)
Document that putting [@- "" -@]
at the end of the span files makes sure no extra whitespace shows up in the output between letters
Point out that you can add a link to a title, but it'll have a weird behavior of putting a link inside a link with the default page.title() output. Not going to try to code against that because there are a ton of ways you can put stuff in weird states and fighting against that isn't worth it compared to just looking at the page, seeing something wrong and then fixing it
Note that shorthands don't nest (though named_spans can). You can add flags and attrs to e.g. add more styles if you'd like. But the point is to make it quick to apply the function of the shorthand code.
Document how span attrs work: Key Value is tried first. If the string starts with alfanumerics + underscores + hyphens and ends with a colon followed by whitespace, it's a key value. Everything else is a flag.
Document flatten_spans for use in the templates.
Write up the logic used for key/value and flags in shorthands where it's a key/value if the initial string is alphanumeric + hyphen + underscore followed by a colon and whitespace. Otherwise, it's a flag
Document .href() that prepends a "/" for an absolute href and removes "index.html" from the end so files are served from the directly url, but you can still do "custom.html" or whatever and it'll go directly to the full path
Documnet how title in pagedata overrides the string that's used for tlinks
Note that while pages aren't published unless they have a specific status it's possible that if the parser can't interpret the file it might publish it as an error page. I'm doing this because I think most of the time having that happen is the desired behavoir. And, as with the rest of this, Neopoligen's current design is such that all pages are public...