Skip to content

pvnhome/pvnt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PVNT

Introduction

PVNT is a simple, open source template utility written in Java.

  • Version: 0.92 (beta)
  • Author: pvnhome

Features

In very simple case we need one template file and several HTML-files that use this template (for example A.html and B.html).

Template file (in templates subdirectory):

<!DOCTYPE html>
<html lang="ru">
<!--pvnTmplBeg-->
<head>
   <meta charset="utf-8">
   <!--pvnEditBeg title-->
   <title>PageTemplate</title>
   <!--pvnEditEnd title-->
</head>
<body>
   <h1>Site1 (A,B)</h1>
   <h2>Part1</h2>
   <!--pvnEditBeg part1-->
   <p>Palceholder for Part1</p>
   <!--pvnEditEnd part1-->
   <h2>Part2</h2>
   <!--pvnEditBeg part2-->
   <p>Palceholder for Part2</p>
   <!--pvnEditEnd part2-->
</body>
<!--pvnTmplEnd-->
</html>

HTML-file A.html:

<!DOCTYPE html>
<html lang="ru">
<!--pvnTmplBeg templates/template.html-->
<head>
   <meta charset="utf-8">
   <!--pvnImplBeg title-->
   <title>PageA</title>
   <!--pvnImplEnd title-->
</head>
<body>
   <h1>Site1 (A,B)</h1>
   <h2>Part1</h2>
   <!--pvnImplBeg part1-->
   <p>Content for Part1 on PageA.</p>
   <!--pvnImplEnd part1-->
   <h2>Part2</h2>
   <!--pvnImplBeg part2-->
   <p>Content for Part2 on PageA.</p>
   <!--pvnImplEnd part2-->
</body>
<!--pvnTmplEnd-->
</html>

HTML-file B.html:

<!DOCTYPE html>
<html lang="ru">
<!--pvnTmplBeg templates/template.html-->
<head>
   <meta charset="utf-8">
   <!--pvnImplBeg title-->
   <title>PageB</title>
   <!--pvnImplEnd title-->
</head>
<body>
   <h1>Site1 (A,B)</h1>
   <h2>Part1</h2>
   <!--pvnImplBeg part1-->
   <p>Content for Part1 on PageB.</p>
   <!--pvnImplEnd part1-->
   <h2>Part2</h2>
   <!--pvnImplBeg part2-->
   <p>Content for Part2 on PageB.</p>
   <!--pvnImplEnd part2-->
</body>
<!--pvnTmplEnd-->
</html>

We can use only three types of tags:

  • pvnTmpl - used to define template file.
  • pvnEdit - used to define editable region in template file.
  • pvnImpl - used to override editable region.

Installation

Installation as simple as 1-2-3:

  • Download pvnt-x.xx.zip and extract it into the directory of your choice.
  • Add the [PVNT]/bin directory to your PATH environment variable.
  • Change [PVNT]/examples/site/templates/template.html file.
  • Execute pvnt command in [PVNT]/examples/site directory.
  • Look at A.html and B.html files for changes.

Website