GithubHelp home page GithubHelp logo

tighten / jigsaw Goto Github PK

View Code? Open in Web Editor NEW
2.1K 55.0 182.0 1.43 MB

Simple static sites with Laravel’s Blade.

Home Page: https://jigsaw.tighten.com

License: MIT License

PHP 57.78% JavaScript 1.15% HTML 35.54% Blade 3.79% CSS 1.75%
jigsaw laravel blade php static-site-generator jamstack

jigsaw's Introduction

jigsaw's People

Contributors

adamwathan avatar bakerkretzmar avatar besologic avatar c-fitzmaurice avatar damiani avatar driftingly avatar faxblaster avatar garhbod avatar github-actions[bot] avatar huguesjoyal avatar intrepidws avatar jk-keller avatar joshmoreno avatar leopoletto avatar lucasmichot avatar m1guelpf avatar maicoqb avatar mattstauffer avatar njames avatar owenvoke avatar petemcfarlane avatar peter279k avatar quickliketurtle avatar raniesantos avatar reed-jones avatar royvanv avatar stancl avatar stefanzweifel avatar zaherg avatar zuzana-kunckova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jigsaw's Issues

Internationalization

Would be cool also to be able to use the trans() helper to load translated content within a static site also...

Generate paths to css and other assets automatically

When the build is generated, if I have second-level pages (for example: about-us/index.html) the header css files in this about-us index file still have the standard path and are not appended with a ../. Is this the default behaviour? How do I call in the css files in second-levels of the site?

I tried to use something like {{ asset('css/app.css') }}, but it doesn't work.

Site variables

Has there been an update to how jigsaw parses variables. Here's the error I get when trying to render a variable.

PHP Notice:  Use of undefined constant a - assumed 'a' in C:\Users\Euler\Code\clonesaw\new_site\_tmp\7c77dc6816148a34ddba2ec4abd46d46e5d3188f.php on line 2
PHP Stack trace:
PHP   1. {main}() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\jigsaw:0
PHP   2. Symfony\Component\Console\Application->run() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\jigsaw:67
PHP   3. Symfony\Component\Console\Application->doRun() C:\Users\Euler\AppData\Roaming\Composer\vendor\symfony\console\Application.php:120
PHP   4. Symfony\Component\Console\Application->doRunCommand() C:\Users\Euler\AppData\Roaming\Composer\vendor\symfony\console\Application.php:189
PHP   5. Symfony\Component\Console\Command\Command->run() C:\Users\Euler\AppData\Roaming\Composer\vendor\symfony\console\Application.php:826
PHP   6. TightenCo\Jigsaw\Console\Command->execute() C:\Users\Euler\AppData\Roaming\Composer\vendor\symfony\console\Command\Command.php:262
PHP   7. TightenCo\Jigsaw\Console\BuildCommand->fire() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Console\Command.php:15
PHP   8. TightenCo\Jigsaw\Jigsaw->build() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Console\BuildCommand.php:42
PHP   9. TightenCo\Jigsaw\Jigsaw->buildSite() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Jigsaw.php:30
PHP  10. Illuminate\Support\Collection->each() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Jigsaw.php:63
PHP  11. TightenCo\Jigsaw\Jigsaw->TightenCo\Jigsaw\{closure}() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\support\Collection.php:244
PHP  12. TightenCo\Jigsaw\Jigsaw->buildFile() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Jigsaw.php:62
PHP  13. TightenCo\Jigsaw\Jigsaw->handle() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Jigsaw.php:78
PHP  14. TightenCo\Jigsaw\Handlers\BladeHandler->handle() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Jigsaw.php:86
PHP  15. TightenCo\Jigsaw\Handlers\BladeHandler->render() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Handlers\BladeHandler.php:23
PHP  16. Illuminate\View\View->render() C:\Users\Euler\AppData\Roaming\Composer\vendor\tightenco\jigsaw\src\Handlers\BladeHandler.php:28
PHP  17. Illuminate\View\View->renderContents() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\view\View.php:85
PHP  18. Illuminate\View\View->getContents() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\view\View.php:120
PHP  19. Illuminate\View\Engines\CompilerEngine->get() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\view\View.php:137
PHP  20. Illuminate\View\Engines\PhpEngine->evaluatePath() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\view\Engines\CompilerEngine.php:59
PHP  21. include() C:\Users\Euler\AppData\Roaming\Composer\vendor\illuminate\view\Engines\PhpEngine.php:42
Site built successfully!

my config.php file

<?php

return [
    'production' => false,
    'a' => 'test'
];

the index.blade.php file

@extends('_layouts.master')

@section('body')
<h1>Hello world! {{ a}}</h1>
@endsection

[Proposal] jigsaw watch

Like what Jekyll has, where it watches for changes and does a jigsaw build for development.

[Feature Request] Generated navigation

I would love to have the ability to generate navigation from a directory of markdown files.

We have a repo of markdown files I would like to pull in as a submodule, have a rebuild triggered, and navigation generated in the template. Regarding sorting, navigation could be spit out alphabetically, or a standardized filename syntax could be established to number the files with prefix to specify the order.

// This spits out an alphabetized array
my_awesome_file.md
a_silly_file.md
stupid_post.md

// This spits out a numbered array
01_my_awesome_file.md
02_a_silly_file.md
03_stupid_post.md

Paired with #24, this could be really powerful, displacing the default source directly to wherever you wish and spitting out structured nav.

Accessing the query string to populate options in the config

I think it'd be a good idea to be able to access query strings from the URL and pass them back through the config.php file in order to generate strings that you can use for links for the blade template.

e.g. http://www.example.com/?test=xxxtestxxx&anothertest=xxxanothertestxxx

Would filter through the config as maybe:

'link' => 'http://www.thisisanotherexample.com?', 'query' => http_build_query(array( 't1' => isset($_GET['test']) ? $_GET['test'] : null, 't2' => isset($_GET['anothertest']) ? $_GET['anothertest'] : null, )),

Back through the view as:

<a href="{{ $link.$query }}">Test</a>

Which would render as:

<a href="http://www.thisisanotherexample.com?t1=xxxtestxxx&t2=xxxanothertestxxx">Test</a>

Filenames starting with a dot are ignored

When running jigsaw build, files starting with a dot are ignored. Initially encountered this with a .htaccess file, but any file with a name starting with a dot is not copied to build_local. This doesn't seem to be intended behaviour, as only files starting with an underscore should be ignored.

Browsersync/Gulp watch choking on many files

jigsaw: 0.6.4
PHP 7.1.2

Running 'gulp watch' has become tedious now that my static site is approaching 1k "posts". Any change seems to be triggering several browsersync "browser reloads" for each file which results in instability for the utility.

I'm fairly new to both gulp and browsersync so maybe I'm misunderstanding what is happening, but it seems like browsersync is triggering as jigsaw builds the site instead of doing it just once after jigsaw is finished.

In any event, I've attached a simple demo project that has 1000 "posts". It doesn't choke the whole thing down due to the simplicity of the content, but it does demonstrate the reloading problem and you can hopefully imagine that a more complex site may be more crippled by this process.

Is there something that can be done to force the "watch" mechanism to wait until jigsaw is done building before "checking" it?

issue.zip

Is there any way to get current route / page name?

I am building a static website with some layouts and elements (header / footer) which includes and navigation as well. I wanted to add a active class in my header.blade.php based on page name.

What I have got from searching over internet.
JavaScript solution, check the URL using location.pathname and add the class active to the navigation links.

But if there is anything in Jigsaw to add the same while its getting compiled would be great, please let me know if this can be possible.

[Feature] Allow Blade template to get page metadata

Currently the Blade template can get metadata about the page it's rendering that was pulled from YAML frontmatter.

It would be helpful if it could get other information about the file--URL, perhaps, or filename. From #46

[Proposal] Add support for page meta

With issue #3 the necessity for per page meta will become a requirement for example:

  • taxonomy (tags, categories, etc) used for generating taxonomy index pages
  • draft status flag
  • published_date (to enable scheduling, if the published_date is in the future the page does not get generated)
  • etc

Page meta could also be made available within the page as PHP variables, in the same way as the config.php variables are; page meta variables with the same key would overwrite variables set in config.php.

Possible methods of implementation:

In a recent client project I used blade comment syntax for this for example:

{{-- draft: true --}}
{{-- tags: bar, foo, etc --}}

I would be happy to dig that code out and add the functionality myself. Alternatively page meta could be added knockout.js style with a html comment such as:

<!-- jigsaw-meta
draft: true
tags:
    bar
    foo
    etc
-->

These comments could then be parsed out when the page is generated to html, so that no backend meta is leaked.

I intend to use jigsaw for a blog and am very happy to help write an implementation for both this and #3.

How would you include fonts?

How would you include fonts - e.g. font-awesome?

My usual workflow using laravel-elixir for font-awesome inclusion is the following:

$ npm i --save font-awesome
// gulpfile.js
mix.copy('node_modules/font-awesome/fonts', 'public/fonts');

When I do so using jigsaw, the font directory is either

  1. Not moved from source/_assets/fonts to build_local or build_production
  2. Deleted from build_local or build_production when running jigsaw build

How do I tackle this now? I seem to be missing something.

[build] Customization of `sourcePath` folder not working

When setting sourcePath to a different folder (as seen on the last two commented lines of this code), it does not behave properly for things that need to be compiled.

Environment

  • Laravel Homestead VM 5.0.1 (bleeding edge)
  • PHP 7.1-fpm
  • jigsaw @ master (yes, bleeding edge code)

Steps to reproduce

  1. create a boostrap.php file on the main project folder
  2. add $sourcePath = cwd() . '/src' (or change /src for anything but /source
  3. run jigsaw build or ./vendor/bin/jigsaw build depending on the type of installation

Expected result

  • use the new the new source path successfully to compile collections, simples pages, partials, etc without exceptions
  • see properly compiled files on the destination folder (build_local or other if it was also set inside bootstrap.php)

Actual result

  • Exception is thrown stating that some layout, collection or simple page does not exist

Screenshot

[Proposal] Include way to handle 404 pages

Not sure if I'm just overlooking the section in the documentation or through my trials through the code, but would be cool to handle missing pages with a 404.blade.php file or something when those errors occur.

Was thinking along the lines of how Laravel uses the errors folder for those views, though not entirely certain how to implement it yet at this point.

PHP Warning - Declaration of TightenCo\Jigsaw\Filesystem::allFiles($directory)

$ ./vendor/bin/jigsaw init
PHP Warning:  Declaration of TightenCo\Jigsaw\Filesystem::allFiles($directory) should be compatible with Illuminate\Filesystem\Filesystem::allFiles($directory, $hidden = false) in /home/wesley/code/the-burgers/vendor/tightenco/jigsaw/src/Filesystem.php on line 6
PHP Stack trace:
PHP   1. {main}() /home/wesley/code/the-burgers/vendor/tightenco/jigsaw/jigsaw:0
PHP   2. spl_autoload_call() /home/wesley/code/the-burgers/vendor/tightenco/jigsaw/jigsaw:55
PHP   3. Composer\Autoload\ClassLoader->loadClass() /home/wesley/code/the-burgers/vendor/tightenco/jigsaw/jigsaw:55
PHP   4. Composer\Autoload\includeFile() /home/wesley/code/the-burgers/vendor/composer/ClassLoader.php:301
PHP   5. include() /home/wesley/code/the-burgers/vendor/composer/ClassLoader.php:412
Site initialized successfully!

Elixir : copy images

Im trying to copy some images from the _assets folder to the build_local folder with this in the gulp.s

.copy(elixir.config.assetsPath + "/img", "build_local/img") // to perform after the jigsaw build

with the command gulp, it wokrs fine
however with the command gulp watch, the copied folder is always removed.

Any ideas please ?

how to inject a config var into a js file ?

I'd like to inject the value of {{ $asset_prefix }} define in config.php / config.production.php into a separate config.js file for example:

'app.config = {
server_url: '{{ $asset_prefix }}',
default_language: 'en'
};'

is there a way to achieve this ? thanks

[Proposal] PHAR Distribution

Given that Jigsaw is primarily run as a CLI tool, would it be possible to box it up and also officially distribute as a .phar?

Add tests

How am I supposed to be able to contribute if I don't know if my changes break functionality?

Global installer for symfony/console v3

Could you make to support symfony/console v3 for global installer. I got error installation since i install symfony/console v3 globally.

is it support like a charm if you change this line "symfony/console": "^2.5|^3.0" ?

[Proposal] Add support for active links.

Add support for navigations to be able to display a class based on if the href is equal to the current page. This solution would be best in blade and markdown flavors.

[PROPOSAL] Command line option for source / dest folders

Would be cool to have an option to specify the source and destination folders.

Usage Example
I would like to build a static site out of pieces of my dynamic site. Therefore I would love for it to share the same layouts, partials, etc., but don't want to put all of my view files in your /source folder. 😉

I'm more than willing to code this up...just wanted to clear it with you first before I proceed...

Ninja edit
This made me chuckle, since that comment basically says what I would make an actual config item 😄

Gulp not working if jigsaw installed locally instead of globally

I performed a local install of jigsaw and am working through the docs. I'm running into an error in the "Compiling Assets" section. Namely, when running 'gulp', the 'jigsaw' is assumed to be installed globally instead of locally.

I had to pop in to gulpfile.js and change line 13 from

.exec('jigsaw build ' + env, ['./source/*', './source/**/*', '!./source/_assets/**/*'])
to
.exec('./vendor/bin/jigsaw build ' + env, ['./source/*', './source/**/*', '!./source/_assets/**/*'])

Not sure the best way to fix it, but noting in the documentation seems like a good start.

Can't install via composer

Installation fails...

`Using version ^0.6.4 for tightenco/jigsaw
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: remove illuminate/contracts v5.4.9
- Conclusion: don't install illuminate/support v5.4.13
- Conclusion: don't install illuminate/contracts v5.4.9
- illuminate/support v5.2.43 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.45 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.0 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.19 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.21 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.24 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.26 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.27 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.28 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.31 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.32 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.37 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.6 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.2.7 requires illuminate/contracts 5.2.* -> satisfiable by illuminate/contracts[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7].
- illuminate/support v5.3.0 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- illuminate/support v5.3.16 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- illuminate/support v5.3.23 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- illuminate/support v5.3.4 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- illuminate/support v5.2.25 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- Can only install one of: illuminate/contracts[v5.2.0, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.19, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.21, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.24, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.25, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.26, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.27, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.28, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.31, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.32, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.37, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.43, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.45, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.6, v5.4.9].
- Can only install one of: illuminate/contracts[v5.2.7, v5.4.9].
- Can only install one of: illuminate/contracts[v5.3.0, v5.4.9].
- Can only install one of: illuminate/contracts[v5.3.16, v5.4.9].
- Can only install one of: illuminate/contracts[v5.3.23, v5.4.9].
- Can only install one of: illuminate/contracts[v5.3.4, v5.4.9].
- Installation request for illuminate/contracts (locked at v5.4.9) -> satisfiable by illuminate/contracts[v5.4.9].
- Installation request for tightenco/jigsaw ^0.6.4 -> satisfiable by tightenco/jigsaw[v0.6.4].
- Conclusion: don't install tightenco/collect v5.4.12|install illuminate/support v5.2.43|install illuminate/support v5.2.45|install illuminate/support v5.3.0|install illuminate/support v5.3.16|install illuminate/support v5.3.23|install illuminate/support v5.3.4|install illuminate/support v5.2.0|install illuminate/support v5.2.19|install illuminate/support v5.2.21|install illuminate/support v5.2.24|install illuminate/support v5.2.25|install illuminate/support v5.2.26|install illuminate/support v5.2.27|install illuminate/support v5.2.28|install illuminate/support v5.2.31|install illuminate/support v5.2.32|install illuminate/support v5.2.37|install illuminate/support v5.2.6|install illuminate/support v5.2.7
- Conclusion: remove tightenco/collect v5.4.12|install illuminate/support v5.2.43|install illuminate/support v5.2.45|install illuminate/support v5.3.0|install illuminate/support v5.3.16|install illuminate/support v5.3.23|install illuminate/support v5.3.4|install illuminate/support v5.2.0|install illuminate/support v5.2.19|install illuminate/support v5.2.21|install illuminate/support v5.2.24|install illuminate/support v5.2.25|install illuminate/support v5.2.26|install illuminate/support v5.2.27|install illuminate/support v5.2.28|install illuminate/support v5.2.31|install illuminate/support v5.2.32|install illuminate/support v5.2.37|install illuminate/support v5.2.6|install illuminate/support v5.2.7
- tightenco/jigsaw v0.6.4 requires illuminate/support ^5.2 -> satisfiable by illuminate/support[v5.2.43, v5.2.45, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.9, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.6, v5.2.7].
- don't install illuminate/support v5.4.0|don't install tightenco/collect v5.4.12
- don't install illuminate/support v5.4.9|don't install tightenco/collect v5.4.12
- Installation request for tightenco/collect (locked at v5.4.12) -> satisfiable by tightenco/collect[v5.4.12].

Installation failed, reverting ./composer.json to its original content.`

If Jigsaw is not installed globally, gulp tasks fail.

Ideally I would like to install jigsaw globally with composer, but this is not yet possible because of a dependency conflict I have between some other packages.
I noticed that in the gulpfile.js the exec command is calling jigsaw build as if it is in the $PATH. Maybe a note in the docs would be enough here, saying that "if you are using jigsaw as a composer dependency , be sure to update the gulpfile.js to use .vendor/bin/jigsaw instead"?

An alternative solution might be to make a post install composer command that replaces the command with sed, something like sed -i '' 's|jigsaw build|./vendor/bin/jigsaw build|' gulpfile.js so the user doesn't even have to be aware of this?

Happy to create a PR but thought I'd get your thoughts first.

Local Install

Followed these exact steps (copy/paste from docs)

cd ~/Sites
mkdir my-site && cd my-site
composer require tightenco/jigsaw
./vendor/bin/jigsaw init
jigsaw build

Received this
-bash: jigsaw: command not found

jigsaw init crashes if path exists

Warning: mkdir(): File exists in C:\Users\Simon\Documents\GitHub\jigsaw\vendor\illuminate\filesystem\Filesystem.php on line 337

If you run jigsaw init twice it will crash due to mkdir failing.

RSS Feed

I recently built a static site with jigsaw. In comparison with other static site builder, one missing feature was RSS feed generation.

I did it manually using large data array in config.php and blade like the following..

// config.php

return [
    'lessons' => [
        [
            'title' => 'Foo title',
            'url' => '/foo.html',
            'description' => 'Foo description...',
        ],
        [...],
    ],
];
<!--// feed.xml.blade.php -->

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ $site_title }}</title>
    <description>{{ $site_description }}</description>
    <link>http://example.com</link>
    <atom:link href="http://example.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>{{ (new DateTime)->format(DATE_ATOM) }}</pubDate>
    <lastBuildDate>{{ (new DateTime)->format(DATE_ATOM) }}</lastBuildDate>
    <generator>Blade templating engine</generator>

    @foreach($lessons as $lesson)
      <item>
        <title>{{ $lesson['title'] }}</title>
        <description>{{ $lesson['description'] }}</description>
        <pubDate>{{ (new DateTime)->format(DATE_ATOM) }}</pubDate>
        <link>http://example.com{{ $lesson['url'] }}</link>
        <guid isPermaLink="true">http://example.com{{ $lesson['url'] }}</guid>
      </item>
    @endforeach
  </channel>
</rss>

and then, in my build script

# build.sh

[ -f build_local/feed.xml.html ] && mv build_local/feed.xml.html build_local/feed.xml

No clean though, I was able to get a valid feed.xml.

While I'm at it, I'd like to ask one more. I hope I can access the array of the file to be compiled, so that I don't have to define the large data in config.php. Metadata like title, description, published_at, ... may be read from front formatter of the markdown file.

Customizing Parsedown

I was looking to tap in to Parsedown's ability to create custom Markdown tags, but I'm not seeing a way to actually get at the instance of Parsedown that's being used or override the instance with an extended instance that includes my customizations. Am I missing something or is that just not possible with Jigsaw?

How could we include a .md file from a file ?

Im having a privacy-policy.blade.php with some layout and im trying to include the content as mardown file like @include('content/content-privacy.md') but this does not compile.
I'd like to re-use the same content in different context (page and lightbox)

[Feature Request] GitHub Pages

Wouldn't it be cool if we added an command which published to the gh-pages branch automagically?

jigsaw gh-pages

The command would build the site, checkout the gh-pages branch, commit with the current date and then push to the remote gh-pages branch.

Inspiration and idea taken from https://github.com/shinnn/gulp-gh-pages

Installation failed

  • illuminate/filesystem v5.1.8 requires symfony/finder 2.7.* -> satisfiable by symfony/finder[v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7].
    • Can only install one of: symfony/finder[v2.6.0, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.1, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.10, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.11, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.12, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.2, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.3, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.4, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.5, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.6, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.7, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.8, v3.0.0].
    • Can only install one of: symfony/finder[v2.6.9, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.0, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.1, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.2, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.3, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.4, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.5, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.6, v3.0.0].
    • Can only install one of: symfony/finder[v2.7.7, v3.0.0].
    • Installation request for symfony/finder == 3.0.0.0 -> satisfiable by symfony/finder[v3.0.0].

Installation failed, reverting ./composer.json to its original content.

Installation Failed

Not allowing me to install, something to do with symphony/console already being installed...

→ composer global require tightenco/jigsaw
Changed current directory to /Users/Andrew/.composer
Using version ^0.5.0 for tightenco/jigsaw
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for tightenco/jigsaw ^0.5.0 -> satisfiable by tightenco/jigsaw[v0.5.0].
    - Conclusion: remove symfony/console v3.0.4
    - Conclusion: don't install symfony/console v3.0.4
    - tightenco/jigsaw v0.5.0 requires symfony/console ^2.5 -> satisfiable by symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.13, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4].
    - Can only install one of: symfony/console[v2.5.0, v3.0.4].
    - Can only install one of: symfony/console[v2.5.1, v3.0.4].
    - Can only install one of: symfony/console[v2.5.10, v3.0.4].
    - Can only install one of: symfony/console[v2.5.11, v3.0.4].
    - Can only install one of: symfony/console[v2.5.12, v3.0.4].
    - Can only install one of: symfony/console[v2.5.2, v3.0.4].
    - Can only install one of: symfony/console[v2.5.3, v3.0.4].
    - Can only install one of: symfony/console[v2.5.4, v3.0.4].
    - Can only install one of: symfony/console[v2.5.5, v3.0.4].
    - Can only install one of: symfony/console[v2.5.6, v3.0.4].
    - Can only install one of: symfony/console[v2.5.7, v3.0.4].
    - Can only install one of: symfony/console[v2.5.8, v3.0.4].
    - Can only install one of: symfony/console[v2.5.9, v3.0.4].
    - Can only install one of: symfony/console[v2.6.0, v3.0.4].
    - Can only install one of: symfony/console[v2.6.1, v3.0.4].
    - Can only install one of: symfony/console[v2.6.10, v3.0.4].
    - Can only install one of: symfony/console[v2.6.11, v3.0.4].
    - Can only install one of: symfony/console[v2.6.12, v3.0.4].
    - Can only install one of: symfony/console[v2.6.13, v3.0.4].
    - Can only install one of: symfony/console[v2.6.2, v3.0.4].
    - Can only install one of: symfony/console[v2.6.3, v3.0.4].
    - Can only install one of: symfony/console[v2.6.4, v3.0.4].
    - Can only install one of: symfony/console[v2.6.5, v3.0.4].
    - Can only install one of: symfony/console[v2.6.6, v3.0.4].
    - Can only install one of: symfony/console[v2.6.7, v3.0.4].
    - Can only install one of: symfony/console[v2.6.8, v3.0.4].
    - Can only install one of: symfony/console[v2.6.9, v3.0.4].
    - Can only install one of: symfony/console[v2.7.0, v3.0.4].
    - Can only install one of: symfony/console[v2.7.1, v3.0.4].
    - Can only install one of: symfony/console[v2.7.10, v3.0.4].
    - Can only install one of: symfony/console[v2.7.11, v3.0.4].
    - Can only install one of: symfony/console[v2.7.2, v3.0.4].
    - Can only install one of: symfony/console[v2.7.3, v3.0.4].
    - Can only install one of: symfony/console[v2.7.4, v3.0.4].
    - Can only install one of: symfony/console[v2.7.5, v3.0.4].
    - Can only install one of: symfony/console[v2.7.6, v3.0.4].
    - Can only install one of: symfony/console[v2.7.7, v3.0.4].
    - Can only install one of: symfony/console[v2.7.8, v3.0.4].
    - Can only install one of: symfony/console[v2.7.9, v3.0.4].
    - Can only install one of: symfony/console[v2.8.0, v3.0.4].
    - Can only install one of: symfony/console[v2.8.1, v3.0.4].
    - Can only install one of: symfony/console[v2.8.2, v3.0.4].
    - Can only install one of: symfony/console[v2.8.3, v3.0.4].
    - Can only install one of: symfony/console[v2.8.4, v3.0.4].
    - Installation request for symfony/console == 3.0.4.0 -> satisfiable by symfony/console[v3.0.4].


Installation failed, reverting ./composer.json to its original content.

Any ideas on how to fix?

Blog Posts

Is in jigsaw possible create a blog post?

File size limit leads to memory error

Hi Adam,
i was adding a video folder with a video filesize of 65Mo
the gulp task seems to fails because of this filesize

here is the tracelog

`[10:34:05] Starting 'exec'...

Triggering Command...
jigsaw build
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 66534158 bytes) in /Users/chrisvidal/.composer/vendor/illuminate/filesystem/Filesystem.php on line 109
[10:34:05] 'exec' errored after 227 ms
[10:34:05] Error in plugin 'gulp-shell'
Message:
Command jigsaw build failed with exit code 255
[10:34:05] Error in plugin 'run-sequence'
Message:
An error occured in task 'exec'.
`

[Feature Request] Folder / SubFolder Pretty URL structure for sites??

Since Jigsaw does a pretty good job with "pretty urls," automatically creating folders and placing the files as index, if there were a way for it to create sub folders which for me currently is a headache as my site has a deeper structure.

currently this is possible...
sales.blade.php -> creates local/sales/index.html
could it be possible to do this...
sales.features.blade.php -> creates local/sales/features/index.html

thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.