gqlalchemy
gqlalchemy copied to clipboard
Enabled social card generation
Description
Social cards are supported by all major social networks:
This pull request enables building social cards for all pages of the documentation.
Pull request type
Please delete options that are not relevant.
- [X] Documentation content changes
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
######################################
Reviewer checklist (the reviewer checks this part)
- [ ] Core feature implementation
- [ ] Tests
- [ ] Code documentation
- [ ] Documentation on gqlalchemy/docs
######################################
@vedranmiletic I guess there are some new pip prerequisites (need to be updated in README)?
@katarinasupe That's correct, will do.
As far as I can see, cairo requires some other packages, too, depending on the OS, and this complicates stuff for us (local builds on Mac etc.). I will leave this open until our next work on docs improvement to see what can be done. Thank you for your contribution! 👏
Here is what I've done to set up docs on Windows using MSYS2:
- Installed MSYS2:
- I downloaded it from MSYS2's official website.
- Installed the Required Libraries:
- After installing MSYS2, I ran the following command to install the necessary libraries:
pacman -S mingw-w64-x86_64-cairo
- After installing MSYS2, I ran the following command to install the necessary libraries:
- Updated the System PATH:
- I added the path
C:\msys64\mingw64\binto my user environment variables in Windows.- I right-clicked on the Start button and selected System.
- Clicked on Advanced system settings on the left panel.
- Clicked on the Environment Variables button under the Advanced tab.
- Under User variables, I found and selected
Path, then clicked Edit. - Clicked New, and then pasted
C:\msys64\mingw64\bin. - Clicked OK to save and exit.
- I added the path
- Reloaded the Command Prompt:
- I closed the current Command Prompt and opened a new one to ensure that the updated
PATHvariable was loaded.
- I closed the current Command Prompt and opened a new one to ensure that the updated
- Ran the MkDocs Command:
- I executed the following command:
mkdocs serve
- I executed the following command:
The build passes. I don't use conda so I didn't try to install cairo that way, but maybe that is also an option.
@katarinasupe there could indeed be complications on macOS/Windows; I only tested on Linux and FreeBSD since that's all I have.
For the local previews, there is no way around installing dependencies.
For deployment, there is also an option to use GitHub Actions with Ubuntu LTS runner instead of the manual workflow with mkdocs gh-deploy that you are using now.
@katarinasupe I found a way to disable social cards for local builds. Cairo is now only necessary when CI environment variable is set to true.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.