I have a page, say {{ site.url }}/books.html
.
I have a variable defined in that page {% assign main_1 = "History" %}
I am using this variable inside an id
property like so: <a id="{{ main_1 }}" href="#{{ main_1 }}"> H1_HEADING </a>
to create inner page links.
I would like to gather all of these variables and put them in the sidepanel, to create a list of inner page links. An example is this page: Modeling Non-linear Least Squares — Ceres Solver (notice how the links in the sidepanel are internal links on the same page)
My question is: Is it possible to access the variable {{ main_1 }}
from outside of the current page, for example from inside includes/sidepanel.html
?