Generating two distinct html outputs from the same document #13563
              
                Unanswered
              
          
                  
                    
                      zackbatist
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 10 replies
-
| It's already possible to do things like that. ---
format:
  html-one:
    html-one: true
  html-two:
    html-two: true
---
{{< lipsum 1 >}}
:::: {.content-visible when-meta="html-one"}
This content is only visible in **html-one** format.
:::
:::: {.content-visible when-meta="html-two"}
This content is only visible in **html-two** format.
:::You can also implement more complex logic using  | 
Beta Was this translation helpful? Give feedback.
                  
                    10 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I wonder if it would be feasible to use the same text to generate distinct html outputs. As far as I understand it, only one set of formatting parameters can be applied for each format type (html, pdf, reveal, etc), but this seems like a very arbitrary limitation.
This could be useful for distributing and making decisions about different formatting options without having to revert all changes for each iteration. It could also be useful for preparing different versions of documents that include or exclude cut content using conditional content parameters (
{.content-visible when-format="html-v1/2/x"}, for example).I think this request aligns with the whole ethos of markdown-based writing, which holds that one text may be used to produce various styled outputs.
Beta Was this translation helpful? Give feedback.
All reactions