<div dir="ltr"><div dir="ltr"><br></div><div>Well, I've made a few more changes and pushed them up.  I think this is as good as it's going to get for now.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 28, 2023 at 6:56 PM <<a href="mailto:asterisk@phreaknet.org">asterisk@phreaknet.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 7/28/2023 8:48 PM, George Joseph wrote:<br>
> On Fri, Jul 28, 2023 at 1:52 PM <<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a> <br>
> <mailto:<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a>>> wrote:<br>
><br>
><br>
>     It's at the very bottom of the README:<br>
>     > If you're always going to build just 1 branch's dynamic<br>
>     documentation,<br>
>     > you can skip the Makefile..inc file and just place everything in<br>
>     the<br>
>     > main Makefile.inc:<br>
><br>
>     The first Makefile..inc has an extra period.... world's least<br>
>     important<br>
>     typo.<br>
><br>
><br>
> Ahha!   It's 'Makefile.<branch>.inc' in the source README.md but the <br>
> '<branch>' is getting stripped. :)<br>
<br>
Ah, probably should've noticed that, actually, Makefile.inc twice in a <br>
row doesn't make any sense, if I was actually thinking about it...<br>
<br>
>     Circling back to one other thing now that this seems good to go, what<br>
>     exactly did you change for reducing the file sizes / is that<br>
>     included in<br>
>     the current iteration, without mike?<br>
><br>
><br>
> The addition of "navigation.prune" under features in mkdocs.yml did <br>
> most of it, and yes, it's currently included.<br>
><br>
>     I'm still seeing a lot of<br>
>     extraneous whitespace in the pages. 244 KB per page isn't huge,<br>
>     but just<br>
>     at a cursory glance, <br>
><br>
><br>
> Can you give me an example of an html page that's that big?  Most I <br>
> see are in the 80-100k range<br>
<br>
I think all of them - for example: <br>
<a href="https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Applications/ADSIProg/" rel="noreferrer" target="_blank">https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Applications/ADSIProg/</a><br>
<br>
This one is "only" 131 KB, but if you go and view source, you can scroll <br>
down a bit and see often hundreds of newlines, tabs, and spaces at a <br>
time in a row. I can't work how that's creeping in from the markdown, so <br>
I don't think it's from the markdown. That's why I thought we might need <br>
to do it manually, e.g. using tr or something like that. So regardless <br>
of page size, I think we could likely prune all the pages down just by <br>
eliminating whitespace.<br>
<br>
><br>
>     I think we could probably cut the size 10-20% just<br>
>     by getting rid of the whitespace. In some places, there are just<br>
>     hundreds of newlines in a row for no reason.<br>
><br>
><br>
> Give me an example page.<br>
><br>
>     If this is just what the<br>
>     tool generates, I understand that, we don't have any control over<br>
>     that,<br>
>     just wanted to know. We could remove it all pretty easily with sed<br>
>     probably, and think could be a final "post processing" step in the<br>
>     Makefile, run recursively on all files. What do you think?<br>
><br>
><br>
> I tried to do exactly that but it didn't result in much savings and I <br>
> got nervous about accidentally deleting multiple "blank" lines without <br>
> knowing whether you might be in a "<pre>" block or not.   I was going <br>
> to try html-minifier but just haven't got to it yet.<br>
<br>
Yeah, I guess that could be tricky. But how much is the <pre> tag <br>
actually used? On the page linked above, for example, I only see it <br>
once, and, ironically, there isn't any extraneous whitespace in it.  I <br>
took a look at a few different types of pages and this appears to be the <br>
case for all of them. So in our particular case, it seems like it might <br>
be okay to do a simple delete, since <pre> shouldn't be affected by <br>
consecutive whitespace.<br>
</blockquote></div></div>