mezzio / mezzio-swoole

Swoole support for Mezzio

Home Page:https://docs.mezzio.dev/mezzio-swoole/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code highlighter doesnt work on website.

linuxd3v opened this issue · comments

Bug Report

syntax highlighter doesnt work on website.

Summary

Code highlighting on website is illegible, its dark gray on slightly less darker gray - hard to read.

Current behavior

Hard to read code examples

How to reproduce

Visit this page https://docs.mezzio.dev/mezzio-swoole/v4/logging/ see this code block:
gray

Expected behavior

we should be seeing nice and fancy syntax highlights in multiple colors that are other then gray

@weierophinney
The problem is this part:

print_info "Deploying documentation"
remote_branch="${PUBLISH_BRANCH}"
local_dir="${HOME}/ghpages_${RANDOM}"

if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then
    print_info "- Cloning branch ${remote_branch} from ${remote_repo} to ${local_dir} and removing previous files"
    cd "${local_dir}"

    git rm -r --ignore-unmatch '*'
else
    print_info "- Creating new ${remote_branch} branch on ${remote_repo} in ${local_dir}"
    git clone --depth=1 --single-branch --branch master "${remote_repo}" "${local_dir}"
    cd "${local_dir}"
    git checkout --orphan "${remote_branch}"
    git rm -rf .
fi

https://github.com/laminas/documentation-theme/blob/7526b6db61db2e94d8a21e6468a95aac1fc0148a/github-actions/docs/entrypoint.sh#L81-L96

Maybe the Mezzio repositories don't have rights to clone repositories from Laminas?!

Maybe the Mezzio repositories don't have rights to clone repositories from Laminas?!

It's using the git protocol, no SSH, so permissions should not be an issue.

I'll see if I can troubleshoot it this week.

@froschdesign I stand corrected; it's using git over ssh. So we'd basically only need to change how the build action clones to use git:// as the schema.

Argghh... reading this, I got confused as to what is happening.

Yes, the issue is exactly where you indicated, @froschdesign - however, it's after documentation has been built. This is the logic for then pushing the documentation to the gh_pages branch. It tries to check out the gh_pages branch of the repo locally, and that's where it's failing with the permissions issue. It's not trying to checkout a Laminas repo, it's having issues checking out itself.

It may be an issue of a missing org or repo secret; I'm continuing to review.

@froschdesign My experiments with laminas/documentation-theme worked; syntax highlighting is fixed on this one!