Here is my question;
.dot graphviz graph in a separate file like so;
digraph {
main->parse->execute;
main->init;
main->cleanup;
execute->make_string;
execute->printf;
init->make_string;
main->printf;
execute->compare;
}
I have to get the contents of this file, in url encoded format, and then append it to this link; https://quickchart.io/graphviz?graph=
and have it inside my markdown post like so;
![my_graph](https://quickchart.io/graphviz?graph=<url encoded .dot file contents>
How would I go about doing this?
I can get the contents of the .dot file with {%- include_relative /graph/my_graph.dot -%}
but I can’t use the url_encode
filter with it. And I don’t mind having the file under my _posts
directory, but if there is a solution where I can store it in any directory under my site root, I would be happier…