Skip to content
This repository was archived by the owner on Oct 28, 2020. It is now read-only.

Commit ae2ff40

Browse files
committed
wip
1 parent 362e31b commit ae2ff40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+50466
-512
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
/vendor
1+
/build_local/
2+
/build_staging/
3+
/build_production/
4+
/build_staging/
5+
/node_modules/
6+
/vendor/
7+
.DS_Store

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 83 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,93 @@
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
42

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.
124

13-
<h4> <center>This is a <bold>community project</bold> and not an official Laravel one </center></h4>
5+
## Installation
146

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:
168

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+
```
2212

23-
------
13+
This starter template includes samples of common page types, and comes pre-configured with:
2414

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
2623

27-
* [Installation](installation.md)
28-
* [Upgrade](upgrade.md)
29-
* [Usage](usage.md)
30-
* [Contributing](contributing.md)
24+
---
3125

32-
------
26+
![Docs starter template screenshot](https://user-images.githubusercontent.com/357312/50345478-40170c00-04fd-11e9-856c-ad46d1ac45cb.png)
3327

34-
## Support the development
35-
**Do you like this project? Support it by donating:**
28+
---
3629

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+
```

bootstrap.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
use App\Listeners\GenerateSitemap;
4+
use TightenCo\Jigsaw\Jigsaw;
5+
6+
/** @var $container \Illuminate\Container\Container */
7+
/** @var $events \TightenCo\Jigsaw\Events\EventBus */
8+
9+
/**
10+
* You can run custom code at different stages of the build process by
11+
* listening to the 'beforeBuild', 'afterCollections', and 'afterBuild' events.
12+
*
13+
* For example:
14+
*
15+
* $events->beforeBuild(function (Jigsaw $jigsaw) {
16+
* // Your code here
17+
* });
18+
*/
19+
20+
$events->afterBuild(GenerateSitemap::class);
21+

carbon.css

Lines changed: 0 additions & 50 deletions
This file was deleted.

composer.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
22
"name": "laravel-zero/website",
3-
"type": "website",
4-
"license": "MIT",
3+
"description": "The Laravel Zero website",
54
"authors": [
65
{
76
"name": "Nuno Maduro",
87
"email": "[email protected]"
98
}
109
],
11-
"require": {}
12-
}
10+
"require": {
11+
"tightenco/jigsaw": "^1.3",
12+
"tightenco/jigsaw-docs-template": "^1.0",
13+
"samdark/sitemap": "^2.2"
14+
},
15+
"autoload": {
16+
"psr-4": {
17+
"App\\Listeners\\": "listeners/"
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)