Download the PHP package bootpress/blog without Composer

On this page you can find all versions of the php package bootpress/blog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blog

use BootPress\Blog\Component as Blog;

Packagist HHVM Tested PHP 7 Supported Build Status Code Climate Test Coverage

A flat file Blog and CMS that doesn't skimp on features, and can be utilized in any website.

Installation

Add the following to your composer.json file.

Create an .htaccess file in your website's public root folder to redirect everything that doesn't exist to an index.php file.

Your index.php file should then look something like this:

Setup Blog

Create a ../page/blog/config.yml file with the following information:

You can access any of these in your Twig templates eg. {{ blog.name }}, including the {{ blog.page }} you are on. Eventually this file will be full of authors, categories, and tags that you can easily manage as well. You can create a Bootstrap list group of categories by:

Other {{ blog.query(...) }}'s include 'tags', 'authors', 'archives', 'recent', 'featured', 'similar', 'posts', and [...] listings of every sort, otherwise known as "The Loop".

Create Content

A BootPress Blog is a flat-file CMS, which means you don't need any fancy admin interface to manage all of the content that is scattered througout a database. You simply create files. All of your blog's posts and pages will reside in the ../page/blog/content/ directory, and if you look at a URL, you will be able to follow the folders straight to your index.html.twig file. For example:

URL File
/ blog/content/index.html.twig
/feed.rss blog/content/feed.rss.twig
/about-me.html blog/content/about-me/index.html.twig
/category/post.html blog/content/category/post/index.html.twig
/category/subcategory/long-title.html blog/content/category/subcategory/long-title/index.html.twig

Why not have the '/about-me.html' URL file at 'content/about-me.html.twig' instead of 'content/about-me/index.html.twig' instead, right? This is so you can have all of the assets that you want to use, right there where you want to use them. Linking to them is even easier. Place an 'image.jpg' in the 'content/about-me/' folder, and link to {{ 'image.jpg'|asset }} in the 'index.html.twig' file. Would you like to resize that? Try an {{ 'image.jpg?w=300'|asset }}. To see all the options, check out the Quick Reference "Glide".

Non-HTML files are accessed according to the '/feed.rss' URL example above.

Twig Templates

Every index.html.twig file is a Twig template that receives the BootPress Page Component, so that you can interact with your HTML Page. The methods available to you are:

The main one you will use everytime is {{ page.set() }} like so:

The Page properties you can set (and retrieve) are:

To make things even easier, you can put all that information in YAML format within a Twig comment at the top of the page. For example:

When you check if ($file = $blog->page()) { ... } we will look for the corresponding Twig template, and if it is there, your $file will either be a string if $page->url['format'] != 'html', or an array suitable for passing to $blog->theme->renderTwig($file) with the following keys:

We don't automatically $page->send() it, so that you can have the opportunity to log or cache the output beforehand. Now you have your blog info, and you can do anything you want with it. You can implement a BootPress Blog into any project. It is as flexible as flexible can be, but if you like the way we do things so far, then let's continue shall we?

Themes

BootPress Themes live in your ../page/blog/themes/ folder. Assuming you have selected the 'default', when you $html = $blog->theme->renderTwig($template), it will pass the $template['vars'] to the $template['file'] in the '../page/blog/themes/default/' folder, and return your $html. If the $template['file'] does not exist, then a default one will be provided for you. If at any time you are wondering what $template['vars'] you have to work with, just {{ dump() }} them, and they will be all spelled out for you.

When you $blog->theme->layout($html), it will pass the $html {{ content }} to your '../page/blog/themes/default/index.html.twig' file which could look something like this:

Plugins

Plugins are Twig macros that reside in your ../page/blog/plugins/ folder, and are easily accessed in any template via {% import '@plugin/name' as name %}. My recommendation is to follow the packagist naming schema of 'vendor/package' with the main file being 'macro.twig'. For example, if you put the following at ../page/blog/plugins/kylob/mailto/macro.twig:

You could then hide an email address from spam bots like so:

Which would result in:

You can pass variables among macros in the same namespace (on the same page) by setting {{ this(_self, 'key', 'value') }} in one macro, and accessing {{ this(_self, 'key') }} in another. This allows you to create "properties" so that your macro plugins can behave a little more like "classes". You can also use nearly every native php function that would be considered safe to use.

License

The MIT License (MIT). Please see License File for more information.


All versions of blog with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
bootpress/page Version ^1.0
bootpress/asset Version ^1.0
bootpress/sqlite Version ^1.0
bootpress/sitemap Version ^1.0
bootpress/hierarchy Version ^1.0
bootpress/pagination Version ^1.0
symfony/var-dumper Version ^2.3||^3.0
symfony/finder Version ^2.3||^3.0
symfony/yaml Version ^2.3||^3.0
jbroadway/urlify Version ^1.0
pguardiario/phpuri Version ^1.0
spartz/text-formatter Version ^1.0
aptoma/twig-markdown Version ^2.0
erusev/parsedown-extra Version ^0.7
twig/twig Version ^1.27
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bootpress/blog contains the following files

Loading the files please wait ....