Download the PHP package savvywombat/caxton without Composer

On this page you can find all versions of the php package savvywombat/caxton. 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 caxton

Caxton

A static site generator written in PHP using Blade templates and Markdown.

Getting started

Installation

Caxton is available through Composer:

Environment and configuration

Caxton looks for a .env file in your project's root directory. The following variables are used (with defaults defined):

You can create different environment configurations, for example .env.prod.

The default environment when building is dev.

Caxton will also look for additional configuration in caxton.json and caxton.{environment}.json. The various options are covered in the relevant sections below.

Building with Caxton

To build a site, you need at least one Blade template in your content directory. Then you can run:

To build for specific environment:

The default environment is dev, so any configuration targeting the dev environment will be used.

Assets (styles, scripts and images)

Common assets should be placed in your public directory. These will be copied to the build directory before your templates are built into HTML.

You can also put assets in your content directory alongside your templates to keep related assets and templates together.

Directory structure

Caxton expects the following structure, but can be overridden with environment variables:

The content and public paths are configurable as ENV variables in .env files.

The public directory should contain common files like images and stylesheets.

The content directory is where you put your templates that Caxton will use to create your HTML. You can include assets (images, stylesheets, scripts, and so on) alongside your templates. These assets will then be included in the same output directory as the generated HTML.

Authoring

Blade PHP Templates

Caxton uses Laravel's Blade template system. Any files in the content directory that end with .blade.php will be converted into an HTML document with the same name.

Markdown

Caxton also allows the use of Markdown within a Blade template. Files in the content directory that end with .blade.md will be passed through a Markdown parser before being saved as an HTML document.

Caxton supports the default CommonMark syntax using the PHP League's package, with one exception. The indentation syntax to format code blocks has been disabled, meaning code blocks must be wrapped in yaml

index: blog date: 2023-08-26 title: Some blog post description: This is really interesting

json { "output": { "index": { "blog": ["date", "desc"], "another": "title" } } } bash vendor/bin/caxton bash vendor/bin/caxton -e prod json { "files": { "include": [ "public/_redirects" ], "exclude": [ "content/never-include-this-file" ], } }

Caxton will then store an internal map for all output for paths starting with /blog/2018/10-22-it-begins/ and rewrite them as /blog/2018-10-22/it-begins. This means that any resources related to the blog post (such as the png file) will be written to the same output URL.

Sitemap

Caxton will generate a sitemap.xml and add it to the root of your output directory. Only HTML files will be included, and the last modified time will be calculated based on the source/template file.

Publishing

Caxton simply builds a directory of content that can be published. How you publish your content is up to you.

Why is this package called Caxton?

William Caxton is thought to be the person who introduced the printing press to England, and so ushered in a great advance in the production of books and dispersal of knowledge.

Acknowledgements

This package uses Laravel's Blade template engine, without requiring the full Laravel framework.

Matt Stauffer has a GitHub repository which has various examples of how to use parts of the framework as standalone components. Specifically, the view component enables the use of Blade.


All versions of caxton with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-fileinfo Version *
ext-yaml Version *
illuminate/view Version ^10.13
vlucas/phpdotenv Version ^5.5
league/commonmark Version ^2.4
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 savvywombat/caxton contains the following files

Loading the files please wait ....