Re: How to Hide Elements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: How to Hide Elements

David Jencks
The asciidoctor ecosystem has a lot of choices in it, so it’s helpful to be very specific about which bits you are using.

In general for asciidoctor (ruby) and asciidoctor.js you can change the html rendering by using the templating system or completely replacing the converter.  I don’t know to what extent this is available in asciidoctorj or for other output formats.

For this specific case, you might try defining the author and email after the header attributes, i.e. having a blank line before them.

David Jencks

On Dec 7, 2020, at 2:47 AM, silverbluemoon [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hi, all. Super new here, so please be patient with me while I ask my myriad of dumb questions I can't figure out, haha.

Okay, so the big question that brings me here today: Is it possible to hide elements from rendering in the HTML? If so, how?

I am specifically interested in how to hide the author name and email from showing up in the header of the html file, though it would be neat to learn how to hide any element from rendering when converted to html or pdf.

I tried commenting out the "author" and "email" lines in the default stylesheet, but it didn't make one bit of difference. I may want to use the authors within the document, so I like having the attributes declared; I just don't want them visible in the header.

Thanks to anyone who tries to help. :D


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-Hide-Elements-tp8389.html
To start a new topic under Asciidoctor :: Discussion, [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: How to Hide Elements

mojavelinux
Administrator
A primitive CSS-based solution to hide the document metadata in the HTML attribute is as follows:

#header .details {
  display: none;
}

Best Regards,

-Dan

On Mon, Dec 7, 2020 at 9:51 AM David Jencks [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The asciidoctor ecosystem has a lot of choices in it, so it’s helpful to be very specific about which bits you are using.

In general for asciidoctor (ruby) and asciidoctor.js you can change the html rendering by using the templating system or completely replacing the converter.  I don’t know to what extent this is available in asciidoctorj or for other output formats.

For this specific case, you might try defining the author and email after the header attributes, i.e. having a blank line before them.

David Jencks

On Dec 7, 2020, at 2:47 AM, silverbluemoon [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hi, all. Super new here, so please be patient with me while I ask my myriad of dumb questions I can't figure out, haha.

Okay, so the big question that brings me here today: Is it possible to hide elements from rendering in the HTML? If so, how?

I am specifically interested in how to hide the author name and email from showing up in the header of the html file, though it would be neat to learn how to hide any element from rendering when converted to html or pdf.

I tried commenting out the "author" and "email" lines in the default stylesheet, but it didn't make one bit of difference. I may want to use the authors within the document, so I like having the attributes declared; I just don't want them visible in the header.

Thanks to anyone who tries to help. :D


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-Hide-Elements-tp8389.html
To start a new topic under Asciidoctor :: Discussion, [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Re-How-to-Hide-Elements-tp8390.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux