Simple static sites with Laravel's Blade.
For documentation, visit https://jigsaw.tighten.com/docs/installation/
Simple static sites with Laravel’s Blade.
Home Page: https://jigsaw.tighten.com
License: MIT License
Simple static sites with Laravel's Blade.
For documentation, visit https://jigsaw.tighten.com/docs/installation/
Would be cool also to be able to use the trans()
helper to load translated content within a static site also...
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.
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
Like what Jekyll has, where it watches for changes and does a jigsaw build for development.
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.
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>
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.
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?
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.
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
With issue #3 the necessity for per page meta will become a requirement for example:
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
.
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 - 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
How do I tackle this now? I seem to be missing something.
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.
boostrap.php
file on the main project folder$sourcePath = cwd() . '/src'
(or change /src
for anything but /source
jigsaw build
or ./vendor/bin/jigsaw build
depending on the type of installationbuild_local
or other if it was also set inside bootstrap.php
)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.
To let people define and pass in things like an analytics ID for example.
$ ./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!
Jigsaw (Packagist)
To install it using composer I had to specify the commit:
composer global require jigsaw/jigsaw:dev-master#7308f69c5d868911b111ccf1b1cfbc683d53af8b
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 ?
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
Hi
Is there a way we can use --production same as in laravel to minify css assets ?
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?
How am I supposed to be able to contribute if I don't know if my changes break functionality?
Would be nice to expose registering custom Blade tags like we can in Laravel.
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" ?
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.
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 😄
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.
If I have a file named about-us.blade.php
, create an about-us
folder and stick the file inside as index.html
.
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.`
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.
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
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.
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.
https://laravel.com/docs/elixir#versioning-and-cache-busting
Will require bringing in the elixir()
helper and making sure it's configured correctly for source and target directories.
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?
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)
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, reverting ./composer.json to its original content.
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?
Is in jigsaw possible create a blog post?
Learning this as I build out the Jigsaw docs page :)
Basically if we have a Blade tag in a code block in a Markdown file, Blade actually tries to compile it. Need to sanitize that stuff before it hits the blade file.
I seem to be using mix a lot more nowadays. Any plans to support it?
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'.
`
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.