<commit_before>Laravel Blogdown
===

This package enables you to write content in Markdown and display it in your **Laravel 5.*** application. You can also use this package to build a simple blog.

### Main Features
* No database / migrations needed
* Pre-renders the content for speed
* Automatically detects changes in markdown files
* Works out of the box
* Simple to use

### Install

Require this package through composer:

	composer require swiftmade/blogdown

Then register the service provider in your config/app.php

	Swiftmade\Blogdown\Providers\BlogdownProvider::class,
	
If you want to change the default blog folder (*defaults to resources/views/blog*), use `php artisan vendor:publish` to publish the config file.

### Use

#### a. Format

Here is a sample blog article:


	/*
	slug: this-is-your-slug
	title: Title of My Article
	keywords: any keywords, you want to add, here
	description: you can add any tag you want
	date: 19.02.2017
	custom: hey! I can access this like $blog->meta->custom
	*/
	
	# Title of My Article
	
	** Bold Text **
	
	Hey, this is my first blogdown article. Here is a list:
	
	* It's awesome
	* It just works!

#### b. Building

You need to put your markdown files (with .md extension) inside the blog folder (see install notes for configuration). Afterwards, you need to run the following artisan command:

	php artisan blog:build

This command is necessary when you add a new article or when you want to flush the entire cache and rebuild it. Blogdown automatically detects a modification to an existing article, so no need to run this when you modify your articles.

#### c. Retrieving Articles

The only meta tag required by Blogdown is *slug*. The package uses this tag as a unique identifier across all your markdown files. While retrieving your blog article, you pass in this slug like this:


	use Swiftmade\Blogdown\Facades\Blogdown;
	..
	..
	Blogdown::find('this-is-your-slug');

And in return you get this object:

	stdClass Object
	(
	    [meta] => stdClass Object
	        (
	            [path] => /path/to/your/file.md
	            [slug] => this-is-your-slug
	            [title] => Title of My Article
	            [keywords] => any keywords, you want to add, here
	            [description] => you can add any tag you want
	            [date] => 19.02.2017
	        )
	
	    [html] => Your HTML code
	)

In your view file just display your rendered HTML unesacped:

	{!! $blog->html !}}
	
### Contributions Are Welcome

If you want to see more features or report bugs feel free to open issues and send pull requests.<commit_msg>Fixed typos and formatting in readme<commit_after>Laravel Blogdown
===

This package enables you to write content in Markdown and display it in your **Laravel 5.*** application. You can also use this package to build a simple blog.

### Main Features
* No database / migrations needed
* Pre-renders the content for speed
* Automatically detects changes in markdown files
* Works out of the box
* Simple to use

### Install

Require this package through composer:

```
composer require swiftmade/blogdown
```

Then register the service provider in your config/app.php

```php
Swiftmade\Blogdown\Providers\BlogdownProvider::class
```
	
If you want to change the default blog folder (*defaults to resources/views/blog*), use `php artisan vendor:publish` to publish the config file.

### Use

#### a. Format

Here is a sample blog article:

```markdown
/*
slug: this-is-your-slug
title: Title of My Article
keywords: any keywords, you want to add, here
description: you can add any tag you want
date: 19.02.2017
custom: hey! I can access this like $blog->meta->custom
*/

# Title of My Article

** Bold Text **

Hey, this is my first blogdown article. Here is a list:

* It's awesome
* It just works!
```

#### b. Building

You need to put your markdown files (with .md extension) inside the blog folder (see install notes for configuration). Afterwards, you need to run the following artisan command:

```
php artisan blog:build
```

This command is necessary when you add a new article or when you want to flush the entire cache and rebuild it. Blogdown automatically detects a modification to an existing article, so no need to run this when you modify your articles.

#### c. Retrieving Articles

The only meta tag required by Blogdown is *slug*. The package uses this tag as a unique identifier across all your markdown files. While retrieving your blog article, you pass in this slug like this:

```php
use Swiftmade\Blogdown\Facades\Blogdown;


Blogdown::find('this-is-your-slug');
```

And in return you get this object:

```php
stdClass Object
(
	[meta] => stdClass Object
		(
			[path] => /path/to/your/file.md
			[slug] => this-is-your-slug
			[title] => Title of My Article
			[keywords] => any keywords, you want to add, here
			[description] => you can add any tag you want
			[date] => 19.02.2017
		)

	[html] => Your HTML code
)
```

In your view file just display your rendered HTML unesacped:

```php
{!! $blog->html !!}
```
	
### Contributions Are Welcome

If you want to see more features or report bugs feel free to open issues and send pull requests.
{'fraction_non_alphanumeric': 0.08516003879728419, 'fraction_numerical': 0.006595538312318138, 'mean_word_length': 3.591273374888691, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3035791', 'n_tokens_mistral': 1530, 'n_tokens_neox': 1411, 'n_words': 709}