Giter VIP home page Giter VIP logo

herbie's People

Contributors

netzweberei avatar phpize avatar tbreuss 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

herbie's Issues

Syntax für Segmente mit spezifischer Formatierung

Die Formatierung von Segmenten könnte wie folgt definiert werden:

--- sidebar ---
Es gilt die Formatierung der Seite (page.format)

--- sidebar:md ---
Sidebar ist Markdown-Formatiert

--- sidebar:html ---
Sidebar ist HTML-Formatiert

Autor-Verlinkung in Blogpost mit Leerzeichen statt "-"

Hallo, habe noch ein Problem festgestellt. Wenn ich als Autor einen Namen mit Leerzeichen wie zb. "Hans Peter" eingebe, wird die URL zur Autorenseite mit Leerzeichen statt "-" generiert (also "blog/author/hans peter", müsste aber "blog/author/hans-peter", damit die angelegte Seite gefunden und angezeigt wird.

Bump dependency versions up

Bump dependency versions up, according to composer outdated command.

codeception/codeception       4.2.2   5.0.10  BDD-style testing framework
codeception/module-asserts    1.3.1   3.0.0   Codeception module containing various assertions
codeception/module-phpbrowser 1.0.3   3.0.0   Codeception module for testing web application over HTTP
laminas/laminas-diactoros     2.25.2  3.0.0   PSR HTTP Message implementations
psr/container                 1.1.2   2.0.2   Common Container Interface (PHP FIG PSR-11)
psr/http-message              1.1     2.0     Common interface for HTTP messages
psr/log                       1.1.4   3.0.0   Common interface for logging libraries
psr/simple-cache              1.0.1   3.0.0   Common interfaces for simple caching
symfony/console               v5.4.24 v6.0.19 Eases the creation of beautiful and testable command line interfaces
symfony/finder                v5.4.0  v6.0.19 Finds files and directories via an intuitive fluent interface
symfony/process               v5.4.24 v6.0.19 Executes commands in sub-processes
symfony/yaml                  v5.4.23 v6.0.19 Loads and dumps YAML files

URL-Rewriting / Slugs

Bei Links, in denen Umlaute vorkommen, wird der Buchstabe weggelassen, statt beispielsweise aus "Ü" "ue" zu machen.

2.x Roadmap/Todos

Todo list for the upcoming 2.x release.

Nice-to-have

  • Implement PSR-14 Event Dispatcher https://www.php-fig.org/psr/psr-14/
  • Add aliases to system info twig function
  • Rename example folder to website
  • Rename src folder to system
  • Rename sysplugins folder to plugins
  • LowerCamelCase member vars in Page class. This is already done, since all of this is possible: page.content_type, page.contentType, page.getContentType()
  • Consistent naming for methods (applications instead of app, eventFilters for events, etc.)
  • Integrate GitHub atom feed into the homepage of the website
  • Implement a query builder class for filtering, sorting und limiting of iterable data structures
  • Add readme to all system plugins (https://github.com/getherbie/herbie/tree/2.x/plugins)

Suggestions

  • Group twig filters, functions and tests logically to make it more clear for the user (i.e. nav_sitemap, nav_breadcrumb, etc.)
  • Replace InterceptingFilters with PSR14- EventListeners, because the latter are strongly typed
  • Remove PageItem and use Page only. Lazy load content and segments.
  • Replace access via magic getters with real getters (we have it already), since the latter is faster and more explicit.
  • Add timestamp to css and js assets to force browsers to refresh cached css and js files
  • Reformat whole code base within Phpstrom according PSR-12 definitions (and defaults)
  • Add support for PHP 8.2
  • Drop support for PHP 7.4 (end-of-life)
  • camelCase all page properties Reason: recommended coding convention for twig is snake_case
  • camelCase all twig filter, functions and globals including attributes Reason: recommended coding convention for twig is snake_case

Issues

  • Add parent IDs to page and pageItem
  • Add parent route to page and pageItem
  • Plugin simplecontact: Success page after sending form doesn't work (index.php/contact:success), make it 2.x compatible, update readme.md
  • Plugin simplesearch: Make it 2.x compatible, update readme.md
  • Slightly refactor Event Handler and send any class to listener
  • Consistent handling for Twig globals as for filters, functions, and tests
  • Whitelist classes to be injected into plugin
  • Move twig "body_class" function from "twig plus" to "twig core" plugin and rename it to "css_classes"
  • Move twig "snippet" function from "twig_plus" to "twig_core" plugin
  • Move twig "page_title" function from "twig_plus" to "twig_core" plugin
  • Group menu twig functions to make it more clear for the user (i.e. menu_sitemap, menu_breadcrumb, etc.)
  • Rename twig "filter" filter due to a naming conflict with twig's own "filter" filter
  • Remove twig filters, functions and tests from "twig_plus" plugin that are not generic like pages_filtered() or pages_recent()
  • Rename "link_file" twig function to "link_media"
  • Rename "file" twig function to "link_file" (the above must be done first)
  • Remove \herbie\TwigFilter, \herbie\TwigFunction, and \herbie\TwigTest
  • Remove unused methods in \herbie\PageList, since we have the query method now
  • Rename event folder to events
  • Rename herbie\sysplugin namespace to herbie\sysplugins
  • Rename tests namespace to herbie\tests
  • Move commands into commands folder
  • Move middlewares into middlewares folder
  • Enhance pagination class with proper members, methods and the narrowed list of items, etc.
  • Use query builder in "menu_list" twig function
  • Implement pagination in query builder, see https://herbie.tebe.ch/doc/indepth/query-builder#paginate

Not necessary

  • Update ServerRequest in Container with current Request including needed arguments like route, routeParams or page Route with params can be retrieved by UrlManager

Won't fix or unsolvable

  • robots.txt doesn't work with internal PHP server (example link http://localhost:9999/robots.txt). Reason: Seems to be an issue with the PHP web server itself.
  • sitemap.xml doesn't work with internal php server (example link http://localhost:9999/sitemap.xml). Reason: Seems to be an issue with the PHP web server itself.
  • Prefix all twig filters, functions and tests with herbie_, h_ or similar (to prevent naming conflicts and better distinguish twig-owned filters, functions and tests). Reason: Makes filters, function or tests too clumsy.
  • Evaluate and include illuminate collections in twig templates. Reason: Collections are indeed very useful, but in Twig not as practical as thought.

Replace finder functionalities with symfony/finder

We have the following file system iterators:

  • system/FileInfoSortableIterator.php
  • system/FlatFileIterator.php
  • system/RecursiveDirectoryIterator.php
  • system/PageTreeFilterIterator.php
  • system/PageTreeFilter.php
  • system/PageTreeHtmlRenderer.php
  • system/PageTreeTextRenderer.php

These iterators could/should be replaced by Symfony/Finder and wrapped in a thin herbie\Finder class.
The new wrapper class should allow searching for pages as well as media files.

Pfad zu CSS-File wird nicht korrekt ausgeliefert

Hallo,

ich habe gerade wie in der Anleitung herbie installiert. Alles läuft, bis auf eine kleine, wichtige Kleinigkeit: Für das CSS-File in "site/assets/default/css/styles.css" wird folgender HTML-Code zum Einbinden generiert: ""

Das sorgt dafür, dass der Browser (zumindest bei mir) die Datei nicht findet.

Danke
Anton

Change PSR-4 autoloader to only have one namespace

At the moment we have the following psr-4 autoloaders:

    "autoload": {
        "psr-4": {
            "herbie\\": "system",
            "herbie\\sysplugins\\": "plugins"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "website\\site\\": "website/site",
            "herbie\\tests\\": "tests"
        }
    },

Todo:

  • Change "website\site\" namespace to "herbie\website\site\"
  • So that we only have one namespace

3 Fragen zum Herbie Flat File CMS

Hallo Entwickler,

eine ganze Weile war ich im eigenen Herbie Blog nicht mehr und erst heute alles wieder uptodate gebracht. Ich sehe, dass hier auf Github in den Rahmen eher weniger los ist oder wie schaut es bei euch mit der aktuellen Weiterentwicklung des Herbie CMS aus?

Gerne würde ich neue Plugins ausprobieren und mir eine Technik in Herbie aneignen. Das Admin Panel ist noch nicht optimal, sodass ich mit dem externen Markdown Pad Editor bloggen muss.

Frage II:

Die Favicon-Integration funktioniert irgendwie bei mir nicht.

Ich habe alle Favicons mit verschiedenen Formaten nach Verzeichnis /web hochgeladen, weil es bei mir zugleich Root ist. Und den HMTL-Code für die Scripte habe ich in der main.html untergebracht, wo ich etwas mit <head>....</head> gesehen habe. So setze ich es in der Regel um.

Frage III:

Wie kann ich das Github Symbol rechts neben meinen Blogposts entfernen, denn es leitet falsch weiter und meine Webseite ist nicht in Github zu bearbeiten.

Dann hoffe ich auf eure Antworten und Danke für dieses geniale Flat File CMS 👍

adminpanel not working

did : composer require getherbie/plugin-adminpanel

did: plugins:
enable:

  • adminpanel

did: plugins:
config:
adminpanel:
show_raw_data: true
password: "md5encoded"
layouts:
default.html:
...

debian 8, nginx 1.8.0

Better error handling

Write better error handling in Application::exception_error_handler.

In some situations an ErrorException with "A session had already been started - ignoring session_start()" will be printed.

ParsedownExtra.php

Hallo,

wir betreiben seit einigen Jahren mit Herbie eine Website auf Uberspace.de.

Nachdem "kürzlich aus Sicherheitsgründen eine veraltete PHP-Version aus allen uberspaces entfernt" wurde, liefert die Seite nur noch einen 500 Internal Server Error. Laut Uberspace "kann es gut sein, dass [das CMS] jetzt auf veraltete Funktionen zugreifen will und das eben den Fehler verursacht".

Das Apache Errorlog sagt:
PHP message: PHP Notice: Trying to access array offset on value of type null in /var/www/virtual/xxx/xxx/vendor/getherbie/herbie/src/plugins/markdown/vendor/ParsedownExtra.php on line 241

Das PHP Errorlog sagt:
"[20-Jun-2022 21:48:40] WARNING: [pool www] child 6936 said into stderr: "NOTICE: PHP message: PHP Notice: Trying to access array offset on value of type null in /var/www/virtual/xxx/xxxx/vendor/getherbie/herbie/src/plugins/markdown/vendor/ParsedownExtra.php on line 241"

Die /vendor/getherbie/herbie/composer.json sagt:
"require": {
"php": ">=5.6.0",
"symfony/yaml": "2.7.*"
},

Derzeit sind PHP 7.4, 8.0 und 8.1 auf dem Server verfügbar, PHP 7.4 ist standardmäßig installiert - sollte also passen.

Was kann ich tun, um die Installation wieder zum Laufen zu bringen?

Danke im voraus!
Ursula

PS: Übrigens ganz großes Lob für dieses geniale, kleine CMS!

Define ordering of events, filters, middlewares, twig filters, twig functions, and twig tests

The order for events, filters, middlewares and Twig filters, functions and tests is not clearly defined.

This should be done in this order:

  1. system plugins
  2. composer plugins
  3. local plugins (site/plugins)
  4. local twig filters (site/twig/filters)
  5. local twig functions (site/twig/functions)
  6. local twig tests (site/twig/tests)
  7. dynamic events, filters, middlewares, twig filters, twig functions, twig tests (using $app->...)

And for each aspect of the different extension points.

Branch: 2.x

"blocks" löschen/überschreiben die Inhalts-Segmente der Eltern-Seite

Hi Thomas,
sobald man Unterseiten mit Hilfe des blocke-shortcodes anzeigen lässt, gehen in der Folge alle bereits geladenen Segmente der Eltern-Seite verloren. Es bleiben nur noch die Segmente des letzten gefundenen Blocks erhalten.

Nach dem Aufruf in herbei/plugins/twig/classes/Twig.php#148:

$segment->string = Hook::trigger(Hook::FILTER, 'renderContent', $segment->string, $page->getData());

ist alles weg :-(
Ich sitze jetzt schon eine ganze Weile drüber, kann aber die Ursache nicht finden.

Viele Grüße,
Andreas

Assets.publish()

When adding an asset after output method was called (outputJs, outputCss) the last added asset won't be published.

3.x Roadmap

3.x Roadmap

Todo:

  • Implement a better (and simpler) page tree class
  • Consistent handling for console commands as for the other extensions methods
  • CSS and JS asset Twig functions doesn't work over inherited Twig templates
  • Consider all http methods for route middlewares (not only GET)

Doing:

  • Adminpanel for pages, data files and assets

Done:

  • Use query builder in menu_list twig function (2.x)

Wie kann ich Herbie CMS upgraden

Hallo Entwickler,

ich würde gerne Herbie upgraden, sehe aber in den Codes, dass sich etwas verändert hat. Ich habe noch die Version 1.0 und nun steht mir ein Upgrade bevor.

Mit Composer Update klappt es nicht, weil wohl mein Herbie System irgendwelche Voraussetzungen nicht erfüllen kann.

Wie kann ich es nun anstellen?

Danke im Vorfeld, Alexander

Move local extensions to own system plugin

Move local extensions (and code) to own system plugin, so that the following dirs are handled by the plugin itself.

  • site/plugins
  • site/twig/filters
  • site/twig/functions
  • site/twig/tests

And if possible:

  • site/filters
  • site/middlewares
  • site/events

The plugin could be named as "local_ext" or so.

Probleme mit https bei Herbie CMS

Hi nochmals,

wollte heute Herbie mit SSL betreiben, aber sah schon, dass unter /adminpanel die Login-Maske nicht richtig dargestellt wurde. Muss ich im System oder den Files für SSL etwas einstellen oder reicht es, dass ich es beim Webhoster habe?

In .htaccess den Redirect hatte ich aber ermöglicht.

Wie kann ich ein Download in Herbie CMS anbieten

Hi Thomas,

eine ganze Weile ist es her als wir den letzten Kontakt miteinander hatten. Da habe ich inzwischen viele CMS installiert und kam wieder auf das Herbie CMS, was ich unter http://herbie.wpzweinull.ch habe.

Ich wollte wissen, wie man einen Download anbieten kann? Ich habe dazu eine Seite und auf der würde ich gerne eine ZIP-Datei zum Herunterladen anbieten. Das ZIP kann dann gerne im FTP-Account aufbewahrt werden. Ist das irgendwie möglich, vielleicht mit einem hübschen Downloadbutton oder so etwas?

Danke im Vorfeld.

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.