Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch --wrap for earmark escript #135

Closed
RobertDober opened this issue Mar 9, 2017 · 2 comments
Closed

Switch --wrap for earmark escript #135

RobertDober opened this issue Mar 9, 2017 · 2 comments
Assignees

Comments

@RobertDober
Copy link
Collaborator

RobertDober commented Mar 9, 2017

The escript earmark produces only a fragment of a static HTML5 webpage.

It might be useful to allow for the provision of some command line switches like, e.g. --wrap and/or --lang, --title to produce something like the following EEx template, in the context of content and options available in Earmark.Cli:

           <!DOCTYPE html>
           <html lang="<% options.lang %>">
                <head>
                   <meta charset="utf-8">
                   <%= if options.title do %>
                   <title><%= options.title %></title>
                   <% end %>
                 </head>
                 <body>
                     <%= Earmark.as_html!(content, options) %> 
                </body>
            </html>
@RobertDober RobertDober added this to the 1.3 milestone Mar 9, 2017
@RobertDober RobertDober self-assigned this Mar 9, 2017
@RobertDober
Copy link
Collaborator Author

RobertDober commented Mar 9, 2017

Using EEx might be tricky because of circular dependencies, maybe we need to generate the wrapping text by hand.

@RobertDober RobertDober modified the milestones: 1.3, 1.3.1 Nov 15, 2018
@RobertDober
Copy link
Collaborator Author

As recently discussed this would add even more options...
An EarmarkWrapper (a very original name indeed) could very simply be a preprocessor that eventually calls Earmark.as_html and integrates its output into the preprocessor's output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant