|
1 |
| -<p align="center"> |
2 |
| - <img title="Laravel Zero" height="100" src="https://raw.githubusercontent.com/laravel-zero/docs/master/images/logo/laravel-zero-readme.png" /> |
3 |
| -</p> |
| 1 | +# Jigsaw Docs Starter Template |
4 | 2 |
|
5 |
| -<p align="center"> |
6 |
| - <a href="https://travis-ci.org/laravel-zero/framework"><img src="https://img.shields.io/travis/laravel-zero/framework/stable.svg" alt="Build Status"></img></a> |
7 |
| - <a href="https://scrutinizer-ci.com/g/laravel-zero/framework"><img src="https://img.shields.io/scrutinizer/g/laravel-zero/framework.svg" alt="Quality Score"></img></a> |
8 |
| - <a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://poser.pugx.org/laravel-zero/framework/d/total.svg" alt="Total Downloads"></a> |
9 |
| - <a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://poser.pugx.org/laravel-zero/framework/v/stable.svg" alt="Latest Stable Version"></a> |
10 |
| - <a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://poser.pugx.org/laravel-zero/framework/license.svg" alt="License"></a> |
11 |
| -</p> |
| 3 | +This is a starter template for creating a beautiful, customizable documentation site for your project with minimal effort. You’ll only have to change a few settings and you’re ready to go. |
12 | 4 |
|
13 |
| -<h4> <center>This is a <bold>community project</bold> and not an official Laravel one </center></h4> |
| 5 | +## Installation |
14 | 6 |
|
15 |
| -Laravel Zero was created by, and is maintained by [Nuno Maduro](https://github.com/nunomaduro), and is a micro-framework that provides an elegant starting point for your console application. It is an **unofficial** and customized version of Laravel optimized for building command-line applications. |
| 7 | +After installing Jigsaw, run the following command from your project directory: |
16 | 8 |
|
17 |
| -- Built on top of the [Laravel](https://laravel.com) components. |
18 |
| -- Optional installation of Laravel [Eloquent](/usage?id=database), Laravel [Logging](/usage?id=log) and many others. |
19 |
| -- Supports interactive [menus](/usage?id=interactive-menus) and [desktop notifications](/usage?id=desktop-notifications) on Linux, Windows & MacOS. |
20 |
| -- Ships with a [Scheduler](/usage?id=scheduler) and a [Standalone Compiler](/usage?id=building-a-standalone-application). |
21 |
| -- Integration with [Collision](https://github.com/nunomaduro/collision) - Beautiful error reporting |
| 9 | +```bash |
| 10 | +./vendor/bin/jigsaw init docs |
| 11 | +``` |
22 | 12 |
|
23 |
| ------- |
| 13 | +This starter template includes samples of common page types, and comes pre-configured with: |
24 | 14 |
|
25 |
| -## Getting started |
| 15 | +- A fully responsive navigation bar |
| 16 | +- A sidebar navigation menu |
| 17 | +- [Tailwind CSS](https://tailwindcss.com/), a utility CSS framework that allows you to customize your design without touching a line of CSS |
| 18 | +- [Purgecss](https://www.purgecss.com/) to remove unused selectors from your CSS, resulting in smaller CSS files |
| 19 | +- Syntax highlighting using [highlight.js](https://highlightjs.org/) |
| 20 | +- A script that automatically generates a `sitemap.xml` file |
| 21 | +- A search bar powered by [Algolia DocSearch](https://community.algolia.com/docsearch/), and instructions on how to get started with their free indexing service |
| 22 | +- A custom 404 page |
26 | 23 |
|
27 |
| -* [Installation](installation.md) |
28 |
| -* [Upgrade](upgrade.md) |
29 |
| -* [Usage](usage.md) |
30 |
| -* [Contributing](contributing.md) |
| 24 | +--- |
31 | 25 |
|
32 |
| ------- |
| 26 | + |
33 | 27 |
|
34 |
| -## Support the development |
35 |
| -**Do you like this project? Support it by donating:** |
| 28 | +--- |
36 | 29 |
|
37 |
| -- PayPal: [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L) |
38 |
| -- Patreon: [Donate](https://www.patreon.com/nunomaduro) |
| 30 | +### Configuring your new site |
| 31 | + |
| 32 | +As with all Jigsaw sites, configuration settings can be found in `config.php`; you can update the variables in that file with settings specific to your project. You can also add new configuration variables there to use across your site; take a look at the [Jigsaw documentation](http://jigsaw.tighten.co/docs/site-variables/) to learn more. |
| 33 | + |
| 34 | +```php |
| 35 | +// config.php |
| 36 | +return [ |
| 37 | + 'baseUrl' => 'https://my-awesome-jigsaw-site.com/', |
| 38 | + 'production' => false, |
| 39 | + 'siteName' => 'My Site', |
| 40 | + 'siteDescription' => 'Give your documentation a boost with Jigsaw.', |
| 41 | + 'docsearchApiKey' => '', |
| 42 | + 'docsearchIndexName' => '', |
| 43 | + 'navigation' => require_once('navigation.php'), |
| 44 | +]; |
| 45 | +``` |
| 46 | + |
| 47 | +> Tip: This configuration file is also where you’ll define any "collections" (for example, a collection of the contributors to your site, or a collection of blog posts). Check out the official [Jigsaw documentation](https://jigsaw.tighten.co/docs/collections/) to learn more. |
| 48 | +
|
| 49 | +--- |
| 50 | + |
| 51 | +### Adding Content |
| 52 | + |
| 53 | +You can write your content using a [variety of file types](http://jigsaw.tighten.co/docs/content-other-file-types/). By default, this starter template expects your content to be located in the `source/docs` folder. If you change this, be sure to update the URL references in `navigation.php`. |
| 54 | + |
| 55 | +The first section of each content page contains a YAML header that specifies how it should be rendered. The `title` attribute is used to dynamically generate HTML `title` and OpenGraph tags for each page. The `extends` attribute defines which parent Blade layout this content file will render with (e.g. `_layouts.documentation` will render with `source/_layouts/documentation.blade.php`), and the `section` attribute defines the Blade "section" that expects this content to be placed into it. |
| 56 | + |
| 57 | +```yaml |
| 58 | +--- |
| 59 | +title: Navigation |
| 60 | +description: Building a navigation menu for your site |
| 61 | +extends: _layouts.documentation |
| 62 | +section: content |
| 63 | +--- |
| 64 | +``` |
| 65 | + |
| 66 | +[Read more about Jigsaw layouts.](https://jigsaw.tighten.co/docs/content-blade/) |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +### Adding Assets |
| 71 | + |
| 72 | +Any assets that need to be compiled (such as JavaScript, Less, or Sass files) can be added to the `source/_assets/` directory, and Laravel Mix will process them when running `npm run local` or `npm run production`. The processed assets will be stored in `/source/assets/build/` (note there is no underscore on this second `assets` directory). |
| 73 | + |
| 74 | +Then, when Jigsaw builds your site, the entire `/source/assets/` directory containing your built files (and any other directories containing static assets, such as images or fonts, that you choose to store there) will be copied to the destination build folders (`build_local`, on your local machine). |
| 75 | + |
| 76 | +Files that don't require processing (such as images and fonts) can be added directly to `/source/assets/`. |
| 77 | + |
| 78 | +[Read more about compiling assets in Jigsaw using Laravel Mix.](http://jigsaw.tighten.co/docs/compiling-assets/) |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## Building Your Site |
| 83 | + |
| 84 | +Now that you’ve edited your configuration variables and know how to customize your styles and content, let’s build the site. |
| 85 | + |
| 86 | +```bash |
| 87 | +# build static files with Jigsaw |
| 88 | +./vendor/bin/jigsaw build |
| 89 | + |
| 90 | +# compile assets with Laravel Mix |
| 91 | +# options: dev, staging, production |
| 92 | +npm run dev |
| 93 | +``` |
0 commit comments