I’m no Ruby whiz, and I’m in over my head on this one. I want to capture the datestamp of my page source compile, then output it in my layout AFTER I have output the page. I don’t know how to store the datestamp so that the layout processing can find it. I’m pretty sure this is possible, though. I won’t detail all my failed attempts. I’d just like a hint about how to do this.
Simple example:
-
My source file is index.html.md.erb
-
It contains:
Here is the compile datestamp from within the compile: <%= Time.new %>
- Here is the relevant part of my layout file:
<%= yield %>
<% require ‘date’ %>
<%= DateTime.now %>
Never mind that I seem to be trying to output the same date twice. In my production run I will ouput it ONLY after the compile is run, and not from within the compiled text - if this is possible
Thanks for you thoughts on this!