Build command (pages from data)

I am using the pages from data workaround to import remote data into my site as content. But because I am importing different types of data, the different content files are in subfolders e.g. remote/medical/ and remote/docs which are then mounted in the configuration. How does the command for such a setup look like in production? This failed on Cloudflare Pages.

cd remote/medical && hugo && cd remote/docs && hugo

Sorry for ‘disturbing’ you again @regis . (The data has grown to 37000 pages and may grow to be twice that once I am done, and building the remote folders locally and uploading is taking too long)

That it’s taking too long… nothing can be done here, I’m guessing the API calls are the culprits.

That command should work anywhere, though you could try hugo -s remote/medical/ && hugo -s remote/docs && hugo

But ultimately, Cloudflare Pages has a maximum page number of 25,000. (Limits · Cloudflare Pages docs)

2 Likes

This worked on Netlify. Perhaps you can document it in the article.

It’s 20,000.

Is it necessary to add in the command the option to clean up the public folder to prevent stale content?

Help me here, what was the error on Cloudflare?

Something about the remote directory not existing.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.