Jekyll Github actions

Hi Team I have list of markdown files for documentation purpose. I’m planning to build github pages website with Jekyll and github actions for deployment. I have created base template for the project and I am able to build and deploy basic website but I’m facing 3 issues.

  1. Relative path links not working
  2. I want to make as my main markdown file how can I do that
    3.Do I need the front matter lines (—) I have hundreds of files so I can’t add — lines to all files
    My github repository is: GitHub - vanamsandeep/testrepo

_config.yml file:
title: “Jekyll Actions Demo”

source: [‘docs’]
include: [‘docs’]
#theme: minima

  • jekyll-timeago
  • jekyll-relative-links

GitHub action yaml file:
name: Build and deploy Jekyll site to GitHub Pages

- main

runs-on: ubuntu-latest
- uses: actions/checkout@v2
- uses: actions/cache@v2
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles(’**/Gemfile’) }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@2.3.1
token: ${{ secrets.GITHUB_TOKEN }}
jekyll_src: ‘docs’ file

I can’t add 3 dashes(- - -) to all the .md files how can I tell github actions to compile all my md files to html without adding front matter lines.

Jekyll is designed to generate files meant to be served via a webserver. So all local links need to be relative to the root of your webserver.
For use inside Markdown files, use {% link path/to/file %}. For use in layouts and includes, use relative_url Liquid filter in conjunction with the document’s URL:
{{ page.url | relative_url }}.

Remove any ./ or ./index.html and set permalink: "/" in ./

Out of the box, Jekyll requires front matter.
But you may use the plugin jekyll-optional-front-matter to override the requirement.

Thank you @ashmaroli . It worked…

@ashmaroli, When I’m working with github actions and I need to raise the PR every time and push the changes to master to view the changes. Is there any plugin/way to run the github actions-locally. Because when I run locally with bundle exec jekyll serve it won’t work as github actions. Can you please help me with how to run it locally the above project.

That’s how GitHub Pages and GitHub Actions work.
I don’t know if GitHub Actions can be run locally.
However, running bundle exec jekyll serve --source docs should work equivalent to the remote build.