Skip to content

Commit

Permalink
Fix #30 + Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xy2z committed Feb 17, 2024
1 parent 4da1c35 commit 9e1a27c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 87 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This file is not really needed as the dev branch is not released as a package
/capro-logo.png export-ignore
/README.md export-ignore
/.gitignore export-ignore
Expand Down
23 changes: 0 additions & 23 deletions CONTRIBUTING.md

This file was deleted.

65 changes: 3 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,6 @@
<div align="center">
# Capro - Dev Branch

![capro logo](./capro-logo.png)
This is the development branch, where the capro.phar file is build from.

Capro is a static-site generator for PHP 8+
See [CONTRIBUTION](https://github.com/xy2z/capro/blob/master/CONTRIBUTING.md) (in master branch)

---

[Quick Setup](#quick-setup) | [Documentation](https://capro.xy2z.io) | [Community](https://github.com/xy2z/capro/discussions) | [Sponsor](https://github.com/sponsors/xy2z)

<p align="center">
<a href="https://github.com/xy2z/capro/releases"><img src="https://img.shields.io/github/v/release/xy2z/capro?style=flat-square&include_prereleases&sort=semver"></a>
<a href="https://github.com/xy2z/capro/blob/master/LICENSE"><img src="https://img.shields.io/github/license/xy2z/capro?style=flat-square&color=blue"></a>
<a href="https://github.com/xy2z/capro/graphs/contributors"><img src="https://img.shields.io/github/contributors/xy2z/capro?style=flat-square"></a>
<a href="https://github.com/xy2z/capro/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22"><img src="https://img.shields.io/github/issues/xy2z/capro/help%20wanted?label=help%20wanted%20issues&style=flat-square&color=f26222"></a>
<a href="https://github.com/xy2z/capro/milestone/1"><img src="https://img.shields.io/github/milestones/progress-percent/xy2z/capro/1?label=alpha%20completion&style=flat-square"></a>
</p>

---

</div>


## ⚠ Notice

Capro is currently in [alpha](https://github.com/xy2z/capro/issues/5), please report bugs via [GitHub Issues](https://github.com/xy2z/capro/issues)


## About

A PHP static-site generator, using Blade template engine.

Capro is currently in alpha, and is not thoroughly tested for production. Breaking changes might occur during the alpha phase.


## Sponsors

Currently none. Sponsor here: https://github.com/sponsors/xy2z


## Requirements
- PHP 8.0+
- [Composer](https://getcomposer.org/)


## Quick Setup
First install the capro global package
```bash
composer global require xy2z/capro:@alpha
```

Now, you can create new sites using:
```bash
capro new demo
cd demo/public
php -S localhost:82
```
Head over to http://localhost:82 to see your new static Capro site.

Learn more in the **[full documentation site](https://capro.xy2z.io).** (which was build in capro)


## Contributing

Pull Requests are welcome! See more in the [Contributing Guide](CONTRIBUTING.md).
7 changes: 6 additions & 1 deletion capro
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ require __DIR__ . '/src/capro_bootstrap.php';

// Autoload.php (for box/phar and development of capro)
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/vendor/autoload.php';
} else {
echo 'Error: Composer\'s vendor/autoload.php file was not found. (try `composer install`)' . PHP_EOL;
exit(1);
}

// Autoload "client's" autoload.php for their project.
if (file_exists(CAPRO_SITE_ROOT_DIR . 'vendor/autoload.php')) {
require_once CAPRO_SITE_ROOT_DIR . 'vendor/autoload.php';
}

// Load env (before config)
if (file_exists(CAPRO_SITE_ROOT_DIR . '.env')) {
$dotenv = Dotenv::createImmutable(CAPRO_SITE_ROOT_DIR);
Expand Down
Binary file removed capro-logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/capro_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace xy2z\Capro;

define('CAPRO_VERSION', '1.0.0-alpha.34');
define('CAPRO_VERSION', '1.0.0-alpha.35');

// Get root dir of the phar file.
// Can't use __DIR__ because that could return the .phar file.
Expand Down

0 comments on commit 9e1a27c

Please sign in to comment.