You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I really like the idea of automatically converting my markdown to html and publishing them to GH pages via this action. Unfortunately I couldn't get images working.
I had a really basic setup, one of my markdown slides had images in it, using the normal syntax of:
Some text: ![](image_file_name.png)
Some other text: ![](some_other_image_file.png)
I've tried a number of iterations:
like above, having the image files in the same directory as the markdown file itself
putting the images in a <path_to_markdown_file>/docs/assets/images directory and using docs/assets/images/image_file_name.png inside the parens in my slides
putting the images in a <repo_root>/docs/assets/images directory
putting the images in a <repo_root>/img directory
(the latter two make sense for not working I guess as my --input_dir doesn't contain the repo's root, see below)
None of which worked 😞
If i don't use this action, but commit my markdown slides to the gh-pages branch directly, the images do show up. But if I use the action, commit to devel and have the Action convert and publish then the images become broken links, with a 404 error.
I'm using the master version of your plugin. Here's my action config file:
# This is a basic workflow to help you get started with Actions
name: Publish Pages
# Controls when the action will run.
# Triggers the workflow on push events for the devel branch
on:
workflow_dispatch:
push:
branches:
- devel
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# TODO(balint) move to self hosted runners once the repo is allowed to use them
# runs-on: [self-hosted]
runs-on: ubuntu-latest
- uses: actions/checkout@v2
- name: Build & Deploy to GitHub Pages
env:
MARP_ARGS: "--input-dir markdown_slides/ --output docs/"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PUBLISH_TO_BRANCH: gh-pages
# You'll want to set this to your domain
BASE_URL: <my base URL is here>
# consider using a tagged release here
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses
uses: ralexander-phi/marp-action@master
The text was updated successfully, but these errors were encountered:
Depending on how your GitHub pages site is deployed (I.E., github.io, dedicated custom domain, folder on custom domain) the exact path will vary. I suspect the examples above are creating paths like https://balint-bg.github.io/docs/assets/images/example.png. This is looking for a GitHub pages repository named docs and a folder assets/images/, which could explain the why the image does not load.
Let me know if that fixes the issue and thanks for trying out the action!
Hello,
I really like the idea of automatically converting my markdown to html and publishing them to GH pages via this action. Unfortunately I couldn't get images working.
I had a really basic setup, one of my markdown slides had images in it, using the normal syntax of:
I've tried a number of iterations:
<path_to_markdown_file>/docs/assets/images
directory and usingdocs/assets/images/image_file_name.png
inside the parens in my slides<repo_root>/docs/assets/images
directory<repo_root>/img
directory(the latter two make sense for not working I guess as my
--input_dir
doesn't contain the repo's root, see below)None of which worked 😞
If i don't use this action, but commit my markdown slides to the
gh-pages
branch directly, the images do show up. But if I use the action, commit todevel
and have the Action convert and publish then the images become broken links, with a 404 error.I'm using the
master
version of your plugin. Here's my action config file:The text was updated successfully, but these errors were encountered: