RESOLVED: Output a single properly formatted HTML page?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

RESOLVED: Output a single properly formatted HTML page?

Post by Phlawm53 »

------
For Flare 11, fully updated.

I'm sure this has been asked before but I can't find it. And if there's an answer I suspect I'll have a Homer Simpson Doh! moment.

Is it possible to configure a TOC and Target (presumably no Master Page required) so that one can output a single Flare topic file as a single HTML page? I don't care if the CSS file goes along for the ride, but I do NOT want JS files and all the other packaging that Flare seems intent on including: The viewer clicks on the HTML page, it comes up in a browser and per the CSS looks good, end of story.

I've tried a few variations on a theme, including for a start creating a Target that specifies a single-topic TOC, Skin = None, and a Master Page that I've configured to include only a topic body proxy, nothing else. The resulting topic file contains all this, NONE of which is desired in this particular output:

Code: Select all

<link href="../Skins/Default/Stylesheets/Slideshow.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/TextEffects.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Topic.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Styles.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Tablet.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Mobile.css" rel="stylesheet" data-mc-generated="True" />
        <link href="../Resources/Stylesheets/MainStyles.css" rel="stylesheet" />
        <script src="../Resources/Scripts/custom.modernizr.js">
        </script>
        <script src="../Resources/Scripts/jquery.min.js">
        </script>
        <script src="../Resources/Scripts/require.min.js">
        </script>
        <script src="../Resources/Scripts/require.config.js">
        </script>
        <script src="../Resources/Scripts/foundation.min.js">
        </script>
        <script src="../Resources/Scripts/plugins.min.js">
        </script>
        <script src="../Resources/Scripts/MadCapAll.js">
        </script>
So I get a skinless HTML page, but despite all that the page has no margins or other "../Resources/Stylesheets/MainStyles.css" attributes that work fine in other "not a single HTML page" contexts. And the page is accompanied by all manner of JS files, et cetera.

I know how to get what I want by working outside of Flare. For example, I copy the HTML output and the CSS into a single directory, then hand-edit the HTML page to remove the superfluous references to everything but the requisite CSS file. So it's not that I can't eventually get the thing done.

But it would be so handy if I could occasionally create a Target and TOC (shouldn't need a Master Page?) to simply generate a topic as a stand-alone HTML page (accompanied by a CSS file if need be).

Cheers & thanks,
Riley
SFO
Last edited by Phlawm53 on Mon Mar 27, 2017 3:51 pm, edited 1 time in total.
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Output a single properly formatted HTML page?

Post by kwag_myers »

Have you tried the XHTML output?
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Output a single properly formatted HTML page?

Post by Phlawm53 »

kwag_myers wrote:Have you tried the XHTML output?
Yes, a few times. But it seems to only "work" with a viewer. That is, try opening the output in a browser -- the content doesn't "stand alone"(?)

I've clarified in my mind the new Flare Target type I'd to see as follows:

The Target type would be something along the lines of "Single Folder HTML5". That is, the HTML page and CSS -- and nothing else -- would go into a single folder that one could then ZIP up and deliver.

The Target's settings would by default produce a CSS file that contains only the CSS used in the HTML output file. The idea is that if the single-file output is derived from an existing project's CSS file, then CSS styles that aren't used in the single topic file are stripped out of the CSS file put into the single-folder output. In fact, I wouldn't object to the topic's CSS being included within the HTML file itself: This is "legal" in the inline CSS sense and would remove the need for a separate CSS file.

Any Flare-specific constructs in the topic file are converted into portable formats. So among other things Flare cross-references become standard hyperlinks.

My need for this arose because I needed to generate a single HTML page that included a link to a ZIP file residing in the same directory. Despite being generally good with tools, and generally good with Flare, I found this to be a difficult thing to do using Flare. I instead had to perform a series of tasks outside Flare to produce what I needed.

Seems silly given that one has something resembling XHTML and CSS, yet can't "just do it" without performing a few manual steps outside of the authoring tool.

Cheers & thanks,
Riley
SFO
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Output a single properly formatted HTML page?

Post by 3lliot »

I too would love a single-file HTML output, because it could be managed as a node / resource by CMS systems, but still open natively in the browser, instead of a PDF plugin.

My use case is publishing to Drupal - I need to use Drupal content management (serving only particular files to users based on their Drupal login) and would rather not have to resort to PDF.

A single HTML file with inline CSS, and optionally some basic inline JS for a sidebar with a persistent ToC would be awesome.

It's such a niche use case though I doubt the development cost would be justified.
AbbyMats
Propeller Head
Posts: 17
Joined: Sun Aug 18, 2013 4:18 pm

Re: Output a single properly formatted HTML page?

Post by AbbyMats »

Maybe it isn't such a niche case? We also have the need to do this and have a number of single-page topics that I would love to be able to output this way. Instead, we just create the standalone files in Notepad++ (sigh). We're running into more cases where we really don't need a TOC and all the other bells and whistles.
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Output a single properly formatted HTML page?

Post by Phlawm53 »

------
Just tried out Flare 2017's new Clean XHTML Target -- seems to be the answer to our needs...

Cheers & hope this helps,
Riley
SFO
Post Reply