Git Product home page Git Product logo

site-builder's People

Contributors

inouire avatar mattattui 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

Watchers

 avatar  avatar  avatar

site-builder's Issues

Default template not always taken into account ?

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,

"Sass compiler not installed" -> Is Sass mandatory ?

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 ?

Refactor app object

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.

Twig variable "back to root" ? (for offline documentation)

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">
  • If you know a simpler way to solve this problem I'm interested ;)
  • If you think that it's not a good idea or that it's a too specific need, please tell me, I'll understand.
  • If you think it's fine, I can try to code this, even if I might need a little help, especially for the usage of the service container.

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.