zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
116 stars 24 forks source link

Doc files have HTM extension, but their links have HTML. #86

Closed m-7761 closed 5 years ago

m-7761 commented 5 years ago

I think probably the files should be renamed to use .html. Anyway, not all browsers will convert html links to htm... or at least wxWidgets' won't.

m-7761 commented 5 years ago

BTW: Do you have any idea how the "template.htm" file is working:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title> Maverick Model 3D Help - <TMPL_VAR name="PAGE_TITLE"> </title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
   </head>

   <body bgcolor="#e0e0e0">

<TMPL_VAR name="PAGE_CONTENT">

<hr/>
<center>
[
<a href="olh_index.html">Contents</a>
|
<a href="olh_detailsindex.html">Introduction</a>
|
<a href="olh_tools.html">Tools</a>
|
<a href="olh_commands.html">Geometry&nbsp;Menu</a>
]
<br/>

Copyright &copy; 2004-2008, Kevin Worcester

</center>

</body></html>

I can't see a mechanism. Is this just something like "index.html" that is automatic? It's not working for me anyway.

The so-called html files don't have their own title/body elements. I don't see anything in the code that can account for it.

zturtleman commented 5 years ago

The Maverick help .html files are generated from files in doc/html/ using Perl HTML::Template module.

https://github.com/zturtleman/mm3d/blob/8c6c6ea29e2ad423d35ed1c2147f09c68f49d94b/doc/html/Makefile.am#L126-L127

The actual usage of HTML::Template is in util/hpagemake.pl.

By default the .html files are generated in doc/html/ which would overwrite the .htm template files if they were renamed.

Currently the html files aren't generated on Windows as Perl is (likely) not present. Windows releases include html files generated on GNU/Linux. It's not really ideal.

m-7761 commented 5 years ago

I see, I just now read the template file, and saw the <TMPL_VAR name="PAGE_TITLE"> and realized that information is not in the htm files, so looked into the folder to see there is a Makefile in there... that outputs .html files. (I guess I wasn't paying attention, because I had to look in there to see the template.htm file.)