This is the official website for Apisearch, a static site generator built with PHP, Twig, and YAML.
- PHP 8.0 or higher
- Composer (PHP dependency manager)
-
Clone the repository (if you haven't already):
git clone <repository-url> cd apisearch-io
-
Install PHP dependencies:
composer install
If you encounter version compatibility issues, update the dependencies:
composer update
The website is generated from Twig templates and YAML configuration files. To build the site:
php generate.phpThis command will:
- Read configuration from
config.yml - Process Twig templates from the
templates/directory - Generate HTML files in the
docs/directory - Support multiple languages (Spanish and English)
After generating the site, serve it locally using PHP's built-in web server:
cd docs
php -S localhost:3000The website will be available at: http://localhost:3000
Note: If port 3000 is already in use, you can use a different port (e.g.,
php -S localhost:8080)
templates/- Twig template fileslanguages/- YAML translation files (es.yml, en.yml)assets/- Static assets (CSS, JS, images)docs/- Generated HTML output (git-ignored)config.yml- Main configuration filegenerate.php- Build scriptcomposer.json- PHP dependencies
- Make changes to templates, translations, or assets
- Run
php generate.phpto rebuild the site - Refresh your browser to see changes (the dev server should still be running)
The generated docs/ directory contains the complete static website ready for deployment to any web server or hosting platform (GitHub Pages, Netlify, etc.).