ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

[Feature Request] Side bar enhancements

Open andrewstarks opened this issue 12 years ago • 1 comments
trafficstars

I can't see how to tell LDoc that I'm writing a single module, and so having a "modules" section seems kind of weird. Also, what are "topics"? Is an introduction a topic? What is "contents"? Contents of the api?

You get what I mean.

For me, generally, I don't want the headings on the side For example, my ideal world would be one where my sidebar could be organized however I wanted it to be.

  1. Let me use file headings as document title. (first heading wins)
  2. Let me use a custom name for the file. (see my other suggestion)
  3. Let me turn off the section headings 4: Let me arbitrarily define my own section headings.
  4. Let me define the order explicitly with some kind of sidebar setting. This would let me, for example, have some topic files, then some class info derived from source, then some more topics, mixed with some section info.

I don't like it when people design my software (without implementing it themselves, especially). But, I can't help but offer a syntax for this... :) (consider it for my therapy only, if that helps)

sidebar = {"|# nml: a cool module", --a pipe means the title. if it starts with a type, it means a heading for the sidebar with no link.
"README.md|!use_headers", --here we are saying, "Use the headings in the readme as links."
"|the api", -- another heading
files, --here we are referencing the files table. It should respect order.
"|examples",
examples, --an examples table... I'm not sure if this already exists as an option in LDoc. I think it does...
"LICENSE.MD|## license", -- here we're using a second level heading for the link.
}

Anyway, hope this is helpful.

andrewstarks avatar Nov 15 '13 17:11 andrewstarks