github.com/gocaveman/caveman@v0.0.0-20191211162744-0ddf99dbdf6e/editor/editor.go (about)

     1  // Visual editor for HTML and Go templates, utilizing Bootstrap.
     2  package editor
     3  
     4  // need something to provide a list of pages
     5  // and a way to read/writ them
     6  
     7  // need something to provide a list of page templates (simple, impl tool to iterate over a dir would do)
     8  
     9  // need something to provide our list of templates that can be included and long with the tooling to
    10  // configure them;
    11  // one way to do it is to have an endpoint that knows how to take the arguments from a template call
    12  // (hm, or actually the full entire tag itself - it might be beneficial to have other arbitrary bits
    13  // of go tempalting be able to be inserted/edited, etc. this would mean that this is wrong:
    14  // <go_template name='/stuff/carousel.gohtml' args='{...}'>
    15  // and it should be more like:
    16  // <go-tag content="{{template &quot;/stuff/carousel.gohtml&quot; Call &quot;{...}&quot;}}">
    17  // )
    18  // and convert it into a configuration screen - that can then be implemented by whatever plugins, possibly
    19  // with just a ServeHTTP call
    20  //
    21  // we probably want one thing to output the form for editing, and another for the preview - but both
    22  // would probably be implemtned by the same module