jekyll-datapage_gen icon indicating copy to clipboard operation
jekyll-datapage_gen copied to clipboard

pages rendered, but not written to the _site

Open mfortini opened this issue 4 years ago • 11 comments

I've been using datapage gen for a long time now, and it's always been working easily. I've created some pages based on a YAML array. They are rendered by jekyll, but in the end they are not written to the website. I could not find any reason. Using jekyll 4.0.0

mfortini avatar Apr 08 '20 09:04 mfortini

Hi, I have tried and have difficulties reproducing your error. I am using the .rb file in the _plugins directory and everything seems to be working fine with Jekyll 4.0.0 (page generated in _site). Can you provide more details or sample code to try and reproduce the issue? thanks in advance! -a

avillafiorita avatar Apr 16 '20 08:04 avillafiorita

Sorry, I spoke too soon. I can reproduce the error. I will look into it.

avillafiorita avatar Apr 16 '20 08:04 avillafiorita

Tried again: it seems to be working now. If you still have the issue, if you let me have an example, I can try and have a look.

avillafiorita avatar Apr 16 '20 10:04 avillafiorita

Thank you for your help, the site we're working on is this https://github.com/emergenzeHack/covid19italia there are other datapages that are rendered correctly (and thank you a lot for saving us so much time and complexity!)

if I add

-
    index_files: false
    data: cfg.issuecategories
    template: issuelist_category
    name: displayname
    dir: /categorie/

then with bundle exec jekyll serve --verbose I can see in the output: Rendering: categorie/raccolte-fondi.html Pre-Render Hooks: categorie/raccolte-fondi.html Rendering Markup: categorie/raccolte-fondi.html Rendering Layout: categorie/raccolte-fondi.html Layout source: site

But in the final “writing” page they don’t get written to the output I’m using jekyll 4.0.0 with ruby 2.5.0

mfortini avatar Apr 16 '20 10:04 mfortini

Hi, I had a look at the repo... it seems like it uses various plugins; I tried but I couldn't isolate the datapage generation issue. Can you provide a stripped-down example demonstrating the issue?

avillafiorita avatar Apr 20 '20 16:04 avillafiorita

I have a similar issue in this repo: https://github.com/OpenDRR/jekyll-info-viz

Locally, the pages get written as expected but in GitHub Pages they are not.

jvanulde avatar May 07 '20 21:05 jvanulde

I have exactly the same issue. I found a kind of annoying workaround though. https://github.com/Booglejr/osmwebsite

  1. Create a workflow that compiles it all in github actions and then deploys to a different branch in the repo

  2. point github pages at the compiled branch.

Here is the workflow file:

name: Build and Deploy GIT Update
on: [push]
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
        with:
          persist-credentials: false

      - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
        run: |
          export PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
          gem install --user-install jekyll bundler 
          bundle install
          bundle exec jekyll build --trace -V
      - name: Install SSH Client 🔑
        uses: webfactory/[email protected]
        with:
          ssh-private-key: ${{ secrets.DEPLOY_KEY }}

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          SSH: true
          BRANCH: gh-pages # The branch the action should deploy to.
          FOLDER: _site # The folder the action should deploy.

JustinWoodring avatar May 07 '20 22:05 JustinWoodring

If I get it right, the issue is related to execution of datapage-generator on Github.

Github, however, allows the execution of a limited set of plugins on their websites, namely, those they trust and rightly so, since a plugin could do pretty nasty stuff. The list of allowed plugins is: https://pages.github.com/versions/.

If this is the case, there is not much I can do on the matter.

Did I get it right?

avillafiorita avatar Jun 13 '20 14:06 avillafiorita

Hi, thanks for your information. I spent some time to find out the plugin does not work with Github Pages. If there is that information somewhere on README together with this comment, it will help😄

pn11 avatar Jun 21 '22 16:06 pn11

Hi, thanks for pointing out. I'll add it to the documentation!

Btw, you can still publish on Github pages even if plugins are not supported, as suggested here: https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins

GitHub Pages cannot build sites using unsupported plugins. If you want to use unsupported plugins, generate your site locally and then push your site's static files to GitHub.

avillafiorita avatar Jun 21 '22 19:06 avillafiorita

Thanks for your reply. I'll check that!

pn11 avatar Jun 22 '22 15:06 pn11