mattattui / site-builder Goto Github PK
View Code? Open in Web Editor NEWSlightly less crappy PHP static site generator
License: MIT License
Slightly less crappy PHP static site generator
License: MIT License
I just noticed a strange behavior towards default template.
Here is my structure
index.md
a/
|_plop.md
b/
|_plop.md
The two plop.md
files are the same, and no template is defined in their front matter. So I assume that default template specified in config.ini
will be used.
index.md
has a specific template though, specified in the front-matter
But when I rebuild the site, one of the generated file has the good template (default), but the other has the template used by index.md !
Any idea ? Thanks for your help,
When I initiate a new project with php site-builder.phar init
If I try to generate the files with php site-builder.phar rebuild
, I have this error:
[InvalidArgumentException]
Sass compiler not installed, or not configured. Check your config.ini
As I don't want to use Sass I left the field blank in the config.ini file: sass_path =
but it doesn't seem to work.
Am I doing something wrong ? Or is there a problem with arguments checking ?
Should be capable of being overridden by content front-matter.
hi.
i'm a newbie to the template languages,so could u pls give/make a concrete website example for me to clone it?
tks
Currently the app object (actually an array) passed to the renderer contains the ContentCollection and ContentHandler objects, but these aren't really the right things to pass.
The ContentCollection isn't aware of content hierarchy (paths are flattened) so generating nav from it isn't very useful. Relative path names are always "root relative" to the output folder, so building nav for a page that isn't in that folder makes broken links. A traversable tree object with a URL generator might make more sense.
Hello there,
I'm currently planning to use site-builder for generation of offline html documentation (not an API doc, more like a user manual for non-tech guys). Thus I'm facing a problem for static ressources management (css+js) when using .md content files in subdirectories:
as the directory structure is kept (which is a good thing), the links to the static resources are broken. And as I'm browsing the doc directly on the disk, I cannot make a reference to the "root of website"
So my idea was to have access to a new variable in Twig generation context. This variable would reference the way to go back to the 'root' (=folder) of my 'website' (=local storage)
The code would look like this:
$data['backToRoot'] = '../../';
Of course this variable would be set differently for each template depending on its location.
Then the variable would be used in template like that:
<link href="{{ backToRoot }}css/my-style.css" rel="stylesheet">
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.