Git Product home page Git Product logo

Comments (4)

tlienart avatar tlienart commented on June 2, 2024 1

Hello Simon, thanks for the nice description and nice blog, seems like we share some common interests.

In this case, using @delay in front of the definition of hfun_post should help so in your utils.jl:

@delay hfun_post(...)
 # rest of the function as you had it
end

This @delay thing is annoying and the next version of Franklin drops it (this is in beta at Xranklin.jl, you could already use it if you wanted to). It was added a while ago to ensure that all pages are processed before the hfun is executed (basically so that the hfun is guaranteed to have access to the full state). It's recommended to use it with Franklin 0.10 for any hfun that makes use of pagevar.

I just did it in a fork of your blog and you can see that the notes page is generated as expected:

https://github.com/tlienart/SimonCoste.github.io/blob/110e6771061e45d09fe4e634d47c84fb24dd2240/notes/index.html#L83-L84

The reason why it was working locally and not on gh page is an unfortunate coincidence related to in what order files are browsed.

from franklin.jl.

SimonCoste avatar SimonCoste commented on June 2, 2024

Thanks for the remarkable speed and accuracy of your answer ❤️

So if I understand correctly, without @delay, the hfun_* can be executed before some pages are processed ? 

from franklin.jl.

SimonCoste avatar SimonCoste commented on June 2, 2024

There is a catch, however : now with @delay all the links are broken. I think the pages werent processed ?
EDIT: my bad it was my own mistake :)

from franklin.jl.

tlienart avatar tlienart commented on June 2, 2024

So if I understand correctly, without @delay, the hfun_* can be executed before some pages are processed ?

yeah that's right

from franklin.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.