// MarkdownPostProcessing goes though the generated files func MarkdownPostProcessing(cmd *cobra.Command, dir string, processor func(string) string) error { … } // cleanupForInclude parts of markdown that will make difficult to use it as include in the website: // - The title of the document (this allow more flexibility for include, e.g. include in tabs) // - The sections see also, that assumes file will be used as a main page func cleanupForInclude(md string) string { … }