The WordPress theme Mone allows you to embed Github code as follows:
I will explain how to use this block.
How to use the GitHub code embed block
- Open the Github code you want to embed.
- Hold down shift and select the range of code you want to embed.
- Click Copy Parmalink from the three lines to copy the link.
- Embed the copied link in the Github code embed block and you’re done.
How to get a Github token
The Github code embed block uses the Github REST API. The Github REST API has a limit of 60 accesses per hour from the same IP address.
The code is cached when it is displayed, but the limit is quickly reached. We recommend using a Github token, as this will relax the API limit.
1.Create a Github account and go to the Settings screen.

2. Click Developer settings from the menu on the left.

3. Click Generate new token from Personal Access Token > Fine-grained token

4. Set the Token name and Expiration and click Generate Token (you can leave the rest as default).

5. A token will be issued, so copy it.

*Once you close the screen, you will not be able to see the token again, so be sure to save it in a safe place.
6. Return to WordPress and paste your GitHub token from the Mone settings and you’re done.

When writing technical blogs, I hope that pasting code from Github will make the articles easier to understand!