Skip to content

Commit 97b916e

Browse files
Preparing for publish
1 parent 6001b74 commit 97b916e

File tree

6 files changed

+467
-21
lines changed

6 files changed

+467
-21
lines changed

CHANGELOG.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2025-10-05
9+
10+
### Added
11+
- Initial release of Java Hypertext Preprocessor (JHP)
12+
- Template engine with intuitive `{{ }}` and `{% %}` syntax
13+
- HTML escaping by default for XSS protection
14+
- Control structures: if/elseif/else, for, foreach, while
15+
- Loop control: break and continue statements
16+
- Template includes with security checks
17+
- Built-in functions: touppercase, tolowercase, trim, len, now
18+
- Custom function registration support
19+
- Context system for variable management
20+
- POJO to Map automatic conversion
21+
- Configurable settings via builder pattern
22+
- Multiple issue handling modes: COMMENT, THROW, DEBUG, IGNORE
23+
- Template caching for improved performance
24+
- Thread-safe concurrent rendering
25+
- Comprehensive unit test suite (88 tests)
26+
- Complete documentation with examples
27+
- Maven Central publishing configuration
28+
29+
### Features
30+
- **Template Syntax**
31+
- Variable output with `{{ variable }}`
32+
- Raw HTML output with `{{{ html }}}`
33+
- Expressions with operators (+, -, *, /, %, ==, !=, <, >, <=, >=, &&, ||, !)
34+
- Ternary operator support
35+
- Member access with dot notation
36+
- Array/list access with square brackets
37+
- Function calls within expressions
38+
39+
- **Control Structures**
40+
- If statements with elseif and else
41+
- For loops with initialization, condition, and update
42+
- Foreach loops for collections, arrays, and maps
43+
- While loops
44+
- Break and continue for loop control
45+
- Template includes with path resolution
46+
47+
- **Configuration**
48+
- Base directory setting
49+
- HTML escaping toggle
50+
- Maximum include depth limit
51+
- Issue handling mode selection
52+
- Builder pattern for easy configuration
53+
54+
- **Security**
55+
- Automatic HTML escaping
56+
- Base directory restriction for includes
57+
- Circular include detection
58+
- Include depth limiting
59+
60+
- **Performance**
61+
- Automatic AST caching
62+
- Thread-safe concurrent rendering
63+
- Efficient template parsing with ANTLR
64+
65+
### Documentation
66+
- Installation guide
67+
- Getting started tutorial
68+
- Template syntax reference
69+
- Control structures guide
70+
- Functions documentation
71+
- Context and variables guide
72+
- Configuration reference
73+
- Advanced usage patterns
74+
- Complete API reference
75+
- Real-world examples
76+
77+
### Testing
78+
- Context management tests
79+
- Settings configuration tests
80+
- Function library tests (built-in and custom)
81+
- JHP engine integration tests
82+
- AST node structure tests
83+
- Template rendering tests
84+
- Error handling tests
85+
86+
---
87+
88+
## Version History
89+
90+
- **1.0.0** (2025-10-05) - Initial release
91+
92+
[1.0.0]: https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/releases/tag/v1.0.0
93+
[Unreleased]: https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/compare/v1.0.0...HEAD

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Java Hypertext Preprocessor (JHP)
22

3+
[![Maven Central](https://img.shields.io/maven-central/v/com.hindbiswas.jhp/jhp.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.hindbiswas.jhp/jhp)
34
[![Java](https://img.shields.io/badge/Java-25-orange.svg)](https://www.oracle.com/java/)
4-
[![Maven](https://img.shields.io/badge/Maven-3.6+-blue.svg)](https://maven.apache.org/)
5-
[![License](https://img.shields.io/badge/License-Open%20Source-green.svg)](LICENSE)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6+
[![GitHub release](https://img.shields.io/github/v/release/hind-sagar-biswas/java-hypertext-preprocessor.svg)](https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/releases)
67

78
A powerful, flexible template engine for Java applications. Inspired by PHP and modern template engines like Jinja2 and Blade, JHP provides an elegant syntax for embedding dynamic content in your HTML templates.
89

@@ -22,16 +23,18 @@ A powerful, flexible template engine for Java applications. Inspired by PHP and
2223

2324
### Installation
2425

25-
Add to your `pom.xml`:
26+
Add the dependency to your `pom.xml`:
2627

2728
```xml
2829
<dependency>
2930
<groupId>com.hindbiswas.jhp</groupId>
3031
<artifactId>jhp</artifactId>
31-
<version>1.0-SNAPSHOT</version>
32+
<version>1.0.0</version>
3233
</dependency>
3334
```
3435

36+
The artifact is available on [Maven Central](https://search.maven.org/artifact/com.hindbiswas.jhp/jhp).
37+
3538
### Basic Usage
3639

3740
```java
@@ -238,13 +241,16 @@ Contributions are welcome! Please feel free to submit pull requests or open issu
238241

239242
## License
240243

241-
This project is open source. Check the repository for license details.
244+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
242245

243246
## Links
244247

245248
- **Documentation**: [docs/](docs/)
246249
- **GitHub**: [java-hypertext-preprocessor](https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/)
250+
- **Maven Central**: [com.hindbiswas.jhp:jhp](https://search.maven.org/artifact/com.hindbiswas.jhp/jhp)
247251
- **Issues**: [Issue Tracker](https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/issues)
252+
- **Publishing Guide**: [PUBLISHING.md](PUBLISHING.md)
253+
- **Changelog**: [CHANGELOG.md](CHANGELOG.md)
248254

249255
## Acknowledgments
250256

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Welcome to the Java Hypertext Preprocessor (JHP) documentation!
88
- [Introduction](README.md) - Overview and quick start
99
- [Installation](installation.md) - How to install and set up JHP
1010
- [Getting Started](getting-started.md) - Your first JHP template
11+
- [Quick Reference](quick-reference.md) - Syntax cheat sheet
1112

1213
### Core Concepts
1314
- [Template Syntax](template-syntax.md) - Learn the template language
@@ -21,6 +22,10 @@ Welcome to the Java Hypertext Preprocessor (JHP) documentation!
2122
- [API Reference](api-reference.md) - Complete API documentation
2223
- [Examples](examples.md) - Real-world examples
2324

25+
### Project Information
26+
- [Changelog](../CHANGELOG.md) - Version history
27+
- [License](../LICENSE) - MIT License
28+
2429
## Quick Links
2530

2631
- **GitHub Repository**: [java-hypertext-preprocessor](https://github.com/hind-sagar-biswas/java-hypertext-preprocessor/)

docs/installation.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,11 @@ Add the following dependency to your `pom.xml`:
2525
<dependency>
2626
<groupId>com.hindbiswas.jhp</groupId>
2727
<artifactId>jhp</artifactId>
28-
<version>1.0-SNAPSHOT</version>
28+
<version>1.0.0</version>
2929
</dependency>
3030
```
3131

32-
### Maven Repository
33-
34-
If you're installing from a local repository or custom Maven repository, ensure the repository is configured in your `pom.xml`:
35-
36-
```xml
37-
<repositories>
38-
<repository>
39-
<id>local-repo</id>
40-
<url>file://${project.basedir}/local-repo</url>
41-
</repository>
42-
</repositories>
43-
```
32+
The artifact is available on Maven Central, so no additional repository configuration is needed.
4433

4534
<a name="building-from-source"></a>
4635
## Building from Source

0 commit comments

Comments
 (0)