Creating myself function in _config.yml

Can I create my own function in liquid so that I can use it later (put something into it)? As in javascript or php. Example:

function functionName (abc) {
console.log(abc + 10);


Output: 23.

Is it possible to create a function to add values into it. Preferably in _config.yml
To use the function on the desired pages

Found a solution. Maybe someone will come in handy.

Create a template in _includes/path.liquid:*
<a href="{{ }}">ancor</a>

Use in page:
{% include path.liquid link=“blablabla” %}

That’s the way.

Mostly you’ll find includes files in Jekyll projects end in .html
You can setup your IDE to see this as Jekyll HTML. VS code supports that

You can also use a .md file if you want markdown in there.

I have bunch of includes files here.

You might use one in your default layout or post layout or on a particular page or even nest includes. Use them how you like.

I’d also recommend the minima theme

For example header and footer and analytics make the default layout which uses them much shorter