cesarParra / apexdocs

Node.js tool to generate documentation for your Salesforce Apex Classes.
https://www.npmjs.com/package/@cparra/apexdocs
MIT License
101 stars 18 forks source link

Jekyll output: front matter configuration #111

Closed ReiSuzuki closed 2 months ago

ReiSuzuki commented 2 months ago

It would be nice to have a feature where you could configure the output for jekyll to not just include the layout in the front matter, but also add the title.

For example, I'd like to be able to add the "title" to all the files with their filenames. --- title: filename.cls ---

cesarParra commented 2 months ago

Hi @ReiSuzuki

Yeah I can make that happen. I am thinking the config file can take another function that would allow you to add whatever else to the front matter section.

cesarParra commented 2 months ago

I've released a prototype of this in beta 2.23.0.

A new configuration function can be provided through the .js/.ts configuration file called frontMatterHeader that allows someone to configure the front matter lines to be added to the output, here's an example: https://github.com/cesarParra/apexdocs/blob/develop/apexdocs.config.ts#L11

I've released as beta first in case there's any feedback or opinions on the approach. I'll be releasing to GA by end of week if it looks good or if there's no feedback.

cesarParra commented 2 months ago

Added in https://github.com/cesarParra/apexdocs/releases/tag/v2.23.0