Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitelist plugin request: jekyll-last-modified-at #838

Open
3 of 4 tasks
BenSouchet opened this issue Jun 20, 2022 · 3 comments
Open
3 of 4 tasks

Whitelist plugin request: jekyll-last-modified-at #838

BenSouchet opened this issue Jun 20, 2022 · 3 comments

Comments

@BenSouchet
Copy link

Hi,
After looking for a way to display the last modification date of pages / collections, I found a good Jekyll plugin that do that: jekyll-last-modified-at.

But, since the plugin isn't whitelisted I cannot use it directly with the Github Pages native flow. I forced to build the Jekyll site and then push the result to Github.

So, I decided to create this "issue" to discuss and know if it was possible to whitelist the plugin.

If there is a better alternative / way / plugin to display the last modification date of a page (without adding it manually via front matter) I'm interested.

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

@kevinnls
Copy link

dupe of #119

also it just seems like it just wouldn't work in the GH Pages environment because of how the source files are processed

you can still build locally and push static content!

@parkr
Copy link
Contributor

parkr commented Jun 24, 2022

GitHub Actions may or may not solve this issue as well. I believe by default, the actions/checkout action does a shallow clone so if you use Actions with this plugin, remember to enable a full clone.

@nisbet-hubbard
Copy link

A workaround is to automate this as part of build:

    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - uses: dorny/paths-filter@v3
        id: filter
        with:
    # Enable listing of files matching each filter.
    # Paths to files will be available in `${FILTER_NAME}_files` output variable.
    # Paths will be escaped and space-delimited.
    # Output is usable as command-line argument list in Linux shell
          list-files: shell

    # In this example changed files will be checked by linter.
    # It doesn't make sense to lint deleted files.
    # Therefore we specify we are only interested in added or modified files.
          filters: |
            markdown:
              - added|modified: '*.md'
              - added|modified: 'path/to/*.md'
      - name: Lint Markdown
        if: ${{ steps.filter.outputs.markdown == 'true' }}
        run: |
          sed -i "0,/last_modified_at.*/s//last_modified_at: $(date +'%Y-%m-%dT%H:%M:%S%:z')/" ${{ steps.filter.outputs.markdown_files }}
      - uses: stefanzweifel/git-auto-commit-action@v5
      - name: Setup Pages
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants