Commit 40d3d439 authored by Dan Untenzu's avatar Dan Untenzu 馃樂
Browse files

[FEATURE] 馃摑 Rewrite Readme

parent 1b8af1be
# Contributing
馃敯 Thank you for your proposed contribution! This guide will help you along.
## Code of Conduct
This project has adopted the [TYPO3 Code of Conduct](https://typo3.org/community/values/code-of-conduct/).
By participating in this project you agree to abide by its terms.
## Vision
The general idea of this project is described in the [README](./README.md#Vision).
## How to contribute
There are many ways to [contribute to Open Source projects](https://opensource.guide/how-to-contribute/)
beyond coding. Draft a new design, test features and give feedback, report bugs,
improve the documentation, review the issue tracker and suggest closing
duplicates or outdated tickets. Spread the word and write a tweet or blog post.
You like to code? Find an open issue and fix a bug. Add tests or improve the
project setup. Or build a new feature.
## Workspace
馃毀 This project is maintained on GitLab.
It is mirrored to GitHub though. If you feel more comfortable with GitHub,
then you are able to work with this mirror just fine.
All issues and pull requests are mirrored to GitLab.
## Opening a ticket
Please always open a ticket or comment on existing issues before you start
working on something.
- [Guide to open a ticket](https://opensource.guide/how-to-contribute/#opening-an-issue)
## Opening a pull request
- [Guide to open a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request)
- [Guide to update a pull request](https://github.com/RichardLitt/knowledge/blob/master/github/amending-a-commit-guide.md)
Keep your pull requests limited to a single issue. One feature branch per issue.
Please explain your changes in a short,
[readable commit message](https://pixelbrackets.de/notes/commit-message-format).
## Coding Guidelines
This project has adopted the
[PSR-2 Coding Style Guide](https://www.php-fig.org/psr/psr-2/) for PHP Code.
General file formats are defined in the [EditorConfig](https://editorconfig.org/).
The project follows the naming scheme of the
[Flow Framework](https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartV/CodingGuideLines/PHP.html#naming)
for classes, methods, variables and filenames.
鉁 Don't worry. The guidlines are checked automatically in every pull request.
## Release cycle
This project has adopted [SemVer 2 Versioning](https://semver.org/).
New commits are composed in branch `development` until a new version is
released.
All notable changes made between each release are documented in the
[Changelog](./CHANGELOG.md).
## Feedback
[Everything in open source should be a series of kindnesses](https://snarky.ca/setting-expectations-for-open-source-participation/#everythinginopensourceshouldbeaseriesofkindnesses).
Please send some [feedback](https://pixelbrackets.de/) and share how this
package has proven useful to you and how you may help to improve it.
# Markdown Mini Page
[![Version](https://img.shields.io/packagist/v/pixelbrackets/markdown-mini-page.svg?style=flat-square)](https://packagist.org/packages/pixelbrackets/markdown-mini-page/)
[![Build Status](https://img.shields.io/gitlab/pipeline/pixelbrackets/markdown-mini-page?style=flat-square)](https://gitlab.com/pixelbrackets/markdown-mini-page/pipelines)
[![Made With](https://img.shields.io/badge/made_with-php-blue?style=flat-square)](https://gitlab.com/pixelbrackets/markdown-mini-page#requirements)
[![License](https://img.shields.io/badge/license-gpl--2.0--or--later-blue.svg?style=flat-square)](https://spdx.org/licenses/GPL-2.0-or-later.html)
[![Contribution](https://img.shields.io/badge/contributions_welcome-%F0%9F%94%B0-brightgreen.svg?labelColor=brightgreen&style=flat-square)](https://gitlab.com/pixelbrackets/markdown-mini-page/-/blob/master/CONTRIBUTING.md)
Quickly convert Markdown into a valid HTML5 page with minimal styles.
![Screenshot](./docs/screenshot.png)
_猸 You like this package? Please star it or send a tweet. 猸恄
## Vision
This package converts Markdown content into HTML, wraps a HTML5 document header
and links a minimal stylesheet. This allows to quickly convert Markdown text
into a webpage view.
- Minimal implementation - Three lines of code are enough
鈫 馃 thanks to [pixelbrackets/html5-mini-template](https://packagist.org/packages/pixelbrackets/html5-mini-template)
- GitHub Flavored Markdown conversion
鈫 馃 thanks to [erusev/parsedown](https://packagist.org/packages/erusev/parsedown)
- GitHub Markdown stylesheet include
鈫 馃 thanks to [pixelbrackets/gfm-stylesheet](https://gitlab.com/pixelbrackets/gfm-stylesheet/)
See [禄Usage芦](#usage) for some examples.
The package follows the KISS principle.
## Requirements
- PHP
## Installation
Packagist Entry https://packagist.org/packages/pixelbrackets/markdown-mini-page/
## Source
https://gitlab.com/pixelbrackets/markdown-mini-page/
Mirror https://github.com/pixelbrackets/markdown-mini-page/ (Issues & Pull
Requests mirrored to GitLab)
## Demo
馃殌 https://markdown-mini-page.app.pixelbrackets.de/
鈱笍 [`php tests/demo.php`](./tests/demo.php).
## Usage
This package supports all options of the
[pixelbrackets/html5-mini-template](https://packagist.org/packages/pixelbrackets/html5-mini-template)
package. For example `setStylesheet()` to overwrite the default stylesheet.
1. Convert a message written in Markdown style into a HTML, wrap into a HTML5
document and link a minimal stylesheet
```php
$markup = (new \Pixelbrackets\MarkdownMiniPage\MarkdownMiniPage())
->setContent('Hello _Markdown_ World!')
->getMarkup();
echo $markup;
```
1. Convert & wrap a message, set your own stylesheet URL and title
```php
$template = (new \Pixelbrackets\MarkdownMiniPage\MarkdownMiniPage())
->setStylesheet('/assets/styles.css')
->setTitle('Index')
->setContent('# Status' . PHP_EOL . 'All Systems Operational');
echo $template->getMarkup();
```
## License
GNU General Public License version 2 or later
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html.
## Author
Dan Untenzu (<mail@pixelbrackets.de> / [@pixelbrackets](https://pixelbrackets.de))
## Changelog
See [CHANGELOG.md](./CHANGELOG.md)
## Contribution
This script is Open Source, so please use, share, patch, extend or fork it.
[Contributions](./CONTRIBUTING.md) are welcome!
## Feedback
Please send some [feedback](https://pixelbrackets.de/) and share how this
package has proven useful to you or how you may help to improve it.
$markup = (new \Pixelbrackets\MarkdownMiniPage\MarkdownMiniPage())
->setContent('# Status' . PHP_EOL . 'All Systems Operational')
->getMarkup();
return $markup;
// Returns minimal HTML5 document markup with a stylesheet CDN
/*
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Status</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Status">
<link rel="stylesheet" href="https://jsdelivr.com/gfm-stylesheet/gfm.min.css">
</head>
<body>
<h1>Status</h1>
<p>All Systems Operational</p>
</body>
</html>
*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment