dzyla/Follow_Relion_gracefully

Shortcode "img" not found

Closed this issue · 5 comments

Upon first run for a project directory it fails to complete:

Error: Error building site: "/home/sbtest/test_data/relion4_sr_20230314/content/jobs/job004/index.md:1:204": failed to extract shortcode: template for shortcode "img" not found
Total in 185 ms

dzyla commented

Hi,

Thanks for sending this issue. Could you provide some more details about the execution of the script?

This error means that the shortcode img.html was not found. You could check if, in the main directory in layouts/shortcodes, you have img.html. It should be provided with the whole GitHub repository.

Let me know if it works!
Best,
Dawid

dzyla commented

I see! It does not process if there is no relion folder with the default pipeline present. The server should start automatically tho. If you use --single, it should just do a single run and quit. Without --single, it waits for the changes in the Relion folder to update the website. The strange part is that it needs help finding the shortcode.

One thing that I can think about is trying to run it from within the FollowRelion folder. I wonder if the path is a couting from the place where you are currently and Hugo server instead of searching inside ./ searches in the absolute path. The FollowRelion.log shows anything in particular?

dzyla commented

Hello James,

That is an incredibly insightful suggestion! As I am not a professional software developer, I have entirely missed this idea. Nevertheless, I believe it should be relatively easy to make the necessary changes. I will work on a solution and will let you know once it is updated. However, I have a few questions:

  • Would it be better if the script downloaded all the required Hugo elements in the directory where the user runs it? I could add extra functions to provide this functionality.
  • Hugo server, if started multiple times, will bind to different ports. It is possible to run multiple Hugo instances, but I'm wondering what the best strategy for a multi-user setup would be.
  • Do you have any suggestions on how to make the script behave better on a cluster setup?

Thank you!
Dawid