Code Monkey home page Code Monkey logo

Comments (1)

marcantondahmen avatar marcantondahmen commented on August 12, 2024 5

Hi,

I'm not exactly sure about the objective of this issue since it is very opinion-based and not really pointing out any bug, making a feature request or giving any constructive feedback that would help to improve the software.

Regarding your "issue", please note that there is also the option to write templates in plain PHP to handle more complex projects. Or you just write a little extension since the engine itself is very extendable. Aside of that, the points you mention are not reflecting its actual set of features. I will try to comment on your list:

  • A little comparison to Twig in terms of cumbersome syntax:
    A Variable in Twig

      {{var|escape}} 
    

    would be in Automad

      @{var|escape} 
    

    And a loop in Twig

      {% for page in pages %}
          * {{ page.title }}
      {% endfor %}
    

    would be in Automad:

      <@ foreach in pagelist @>
          * @{ title }
      <@ end @>
    

    Note that you can even iterate a list of images while resizing them at the same time in one single statement (I can't find quickly any example for this task in Twig):

      <@ foreach in '*.jpg' { width: 300, height: 200, crop: true } @> 
          <img src="@{ :fileResized }">
      <@ end @> 
    

    I'm not sure how to do that in Smarty.

  • Some kind of objects are supported, like pagelists, filters, tags and a filelist. All of those objects are configurable. Basically objects here are boiled down to the essentials for developing websites like portfolios or blogs. Generic arrays can be handled by using PHP.

  • What is a critical string manipulation function?

  • What do you mean with poorly named?

There is also this article on CSS-Tricks giving a little introduction into the template language.

I hope this can clear up some of the misunderstandings. You can find more information on writing templates in the official docs.

from automad.

Related Issues (20)

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.