Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > HTML preprocessor

Reply
Thread Tools

HTML preprocessor

 
 
Bart Vandewoestyne
Guest
Posts: n/a
 
      01-17-2007
The webspace I have access to from my ISP only allows me to use static
(X)HTML pages, so I'm trying to stick with static (X)HTML content for
my personal webpage.

There are however certain things that i need in each .html file, such as
the navigation, header, footer,... and therefore I'm looking for a good,
clean and maintainable way to create my .html files with navigation,
header, footer,... without the need to copy them to each .html file.

After some googling, I've found out that probably the best solution for me
is to use a HTML preprocessor, see for examle
http://www.htmlhelp.com/faq/html/all.html#15
A list of HTML preprocessors can be found at
http://www.htmlhelp.com/links/preprocessors.html

Now before I begin to look at these one by one, i would like to know
if there are people who can recommend me a certain HTML preprocessor from
that list. I don't need very complicated things, the most important is
that I can include my navigation, header and footer stuff into each page
and that the system allows easy modifications to the content of my static
(X)HTML website. Some playing with variables would also be nice.

I am only looking for Opebn Source Software that works on Linux or Windows,
so i won't consider freeware or closed source stuff.

Are there any recommended and easy to use HTML preprocessors?

Thanks,
Bart

--
"Share what you know. Learn what you don't."
 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      01-17-2007
Bart Vandewoestyne wrote:

> Are there any recommended and easy to use HTML preprocessors?


These days I'm using a homebrew thing in Perl that does a bunch of
processing on documents (such as tagish indexes, related page blocks
and tables of content generated from the headings in the document), but
at the heart of it is Template-Toolkit.

http://www.template-toolkit.org/

The ttree program that comes with it sounds like just what you need.

http://www.template-toolkit.org/docs...ols/ttree.html

Note the insert and include directives.

http://www.template-toolkit.org/docs...les_and_Blocks

 
Reply With Quote
 
 
 
 
Jim Moe
Guest
Posts: n/a
 
      01-18-2007
Bart Vandewoestyne wrote:
> The webspace I have access to from my ISP only allows me to use static
> (X)HTML pages, so I'm trying to stick with static (X)HTML content for
> my personal webpage.
>

I presume that you can create the pages locally and upload them to the site.

> There are however certain things that i need in each .html file, such as
> the navigation, header, footer,... and therefore I'm looking for a good,
> clean and maintainable way to create my .html files with navigation,
> header, footer,... without the need to copy them to each .html file.
>

Although PHP is normally a server-side addition, it has an executable
version that can process a page; it outputs HTML. Use PHP to generate all
of the common parts.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
 
Reply With Quote
 
Bart Vandewoestyne
Guest
Posts: n/a
 
      01-18-2007
On 2007-01-18, Jim Moe <(E-Mail Removed)> wrote:
>
> [...]
> I presume that you can create the pages locally and upload them to the site.


Yes.

> Although PHP is normally a server-side addition, it has an executable
> version that can process a page; it outputs HTML.
> Use PHP to generate all of the common parts.


Aha... this might indeed also be an interesting approach... I
thought I could not use PHP because it gets processed on the
server and my ISP does not support PHP. But if I can process my
..php files locally and then upload them, that might be a solution.

The only question that I'm left with is if that php-executable is
in some Debian (stable) package? Searching for 'php' at the
Debian packages website gives me

http://packages.debian.org/cgi-bin/s...able&arch=i386

Or does the executable have another name?

Thanks,
Bart

--
"Share what you know. Learn what you don't."
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      01-18-2007
Bart Vandewoestyne wrote:

> The only question that I'm left with is if that php-executable is
> in some Debian (stable) package? Searching for 'php' at the
> Debian packages website gives me


I think you'll want "php4-cgi" which has the executable (as opposed to
Apache module) version.

 
Reply With Quote
 
aa
Guest
Posts: n/a
 
      01-18-2007
Javascript?


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      01-18-2007

aa wrote:
> Javascript?


Running on the client? Very bad idea. It becomes invisible to anyone
without JS enabled, including search engine indexing bots.

 
Reply With Quote
 
Bart Vandewoestyne
Guest
Posts: n/a
 
      01-18-2007
On 2007-01-18, David Dorward <(E-Mail Removed)> wrote:
>
> I think you'll want "php4-cgi" which has the executable (as opposed to
> Apache module) version.


Hmm... I've just installed php4-cli and that seems to have what i
need:

mc303@forsythe:~$ php -v
PHP 4.3.10-18 (cli) (built: Nov 3 2006 21:56:29)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

I'm not sure what the difference is with the cli-client from the php4-cgi
package.

Thanks!
Bart

--
"Share what you know. Learn what you don't."
 
Reply With Quote
 
aa
Guest
Posts: n/a
 
      01-18-2007

"David Dorward" <(E-Mail Removed)>
> > Javascript?

> Running on the client? Very bad idea. It becomes invisible to anyone
> without JS enabled, including search engine indexing bots.


1. The author is talking about navigation, header, footer do not need to be
scanned by Search Engines. I appreciate that navigation, header, footer can
be loaded with keywords, but it is considered a dirty trick

2. What is the percentage of non-JS visitors? Are you saying that JS
should not be used at all?


 
Reply With Quote
 
aa
Guest
Posts: n/a
 
      01-18-2007
Interesting thing, yet not perfectly clear. If you install it on your local
machine only, then it is not more than a sort of an authoring assistant, is
it ?
If you change, say a footer, you will have to "recompile" all the pages
using the footer and then upload them?
What am I missing?

"Bart Vandewoestyne" <(E-Mail Removed)> сообщил/сообщила в
новостях следующее: news:(E-Mail Removed) ...
> On 2007-01-18, David Dorward <(E-Mail Removed)> wrote:
> >
> > I think you'll want "php4-cgi" which has the executable (as opposed to
> > Apache module) version.

>
> Hmm... I've just installed php4-cli and that seems to have what i
> need:
>
> mc303@forsythe:~$ php -v
> PHP 4.3.10-18 (cli) (built: Nov 3 2006 21:56:29)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> I'm not sure what the difference is with the cli-client from the php4-cgi
> package.
>
> Thanks!
> Bart
>
> --
> "Share what you know. Learn what you don't."



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a 100-line indentation-based preprocessor for HTML Steve Howell Python 1 12-01-2009 07:30 AM
firefox html, my downloaded html and firebug html different? Adam Akhtar Ruby 9 08-16-2008 07:55 PM
Compiler error occurred when try to use a flexible template expression in preprocessor definesCompiler error occurred when try to use a flexible template expression in preprocessor defines snnn C++ 6 03-14-2005 04:09 PM
preprocessor, token concatenation, no valid preprocessor token Cronus C++ 1 07-14-2004 11:10 PM
Preprocessor conditional compilation variable not being saved Chris P ASP .Net 0 10-28-2003 08:48 PM



Advertisments