Agency - Service in markdown

Like in this topic, I’m struggling to have some words formatted with markdown in my services.md

Although the tag method looked smart, I couldn’t manage to make it work,

Neiter in grav/user/themes/mytheme/templates/modular/services.html.twig


<section id="services">
  <div class="container">
    <div class="row">
        <div class="col-lg-12 text-center">
            {{ content|raw }}
        </div>
    </div>
    <div class="row text-center">
        {% for service in page.header.services %}
            <div class="col-md-4">
                 {% if service.icon %}
                    <span class="fa-stack fa-4x">
                        <i class="fa fa-circle fa-stack-2x text-primary"></i>
                        <i class="fa fa-{{ service.icon }} fa-stack-1x fa-inverse"></i>
                    </span>
                {% endif %}
                {% if service.header %}
                    <h4 class="service-heading">{{ service.header }}</h4>
                {% endif %}
                {% if service.text %}
#HERE
                    <p class="text-muted">{{ service.text|markdown}}</p> # HERE
#HERE
                {% endif %}
            </div>
        {% endfor %}
    </div>
</div>
</section>

Nor in grav/user/themes/mytheme/templates/modular.html.twig

{% extends 'partials/base.html.twig' %}

{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}


{% block content %}
    {{ page.content|raw }}
    {% for module in page.collection() %}
# THERE
        {{ module.content|markdown }} # THERE
# THERE
    {% endfor %}
{% endblock %}

Any help would be appreciated ^^

@citoyencandide, Grav is fast because it caches parsed pages and Twig.

Therefor, you need to run $ bin/grav cache to clear the cache when things have changed when Grav doesn’t know about it. A change inside a page, or config file will always be detected by Grav, but changes in Twig not.

While developing some may find in handy to switch off caching temporarily.

// user/config/system.yaml

cache:
  enabled: false

ha …

thanks for the point.

keep in mind, that i do not host myself the server, so i should use the admin panel to clear the cache.

let’s try again, so …

this one worked !

@citoyencandide,

keep in mind, that i do not host myself the server, so i should use the admin panel to clear the cache.

That makes me wonder how you edit custom.css and Twig files…

I reach this files via a ftp connection.

@citoyencandide, Ok, in that case, ftp-ing system.yaml (or any other config file) over to the server, might cause a cache invalidation too. But Admin works fine too of course.