Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled social card generation #287

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vedranmiletic
Copy link
Contributor

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.

  • Documentation content changes

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • 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

######################################

Adds a good looking and automatically generated social card to each
page of the documentation (for sharing on FB, X, Linkedin, etc.).
@katarinasupe
Copy link
Contributor

@vedranmiletic I guess there are some new pip prerequisites (need to be updated in README)?

@vedranmiletic
Copy link
Contributor Author

@katarinasupe That's correct, will do.

@katarinasupe
Copy link
Contributor

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! 👏

@kgolubic
Copy link
Contributor

kgolubic commented Sep 26, 2023

Here is what I've done to set up docs on Windows using MSYS2:

  • Installed MSYS2:
  • Installed the Required Libraries:
    • After installing MSYS2, I ran the following command to install the necessary libraries:
      pacman -S mingw-w64-x86_64-cairo
  • Updated the System PATH:
    • I added the path C:\msys64\mingw64\bin to 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.
  • Reloaded the Command Prompt:
    • I closed the current Command Prompt and opened a new one to ensure that the updated PATH variable was loaded.
  • Ran the MkDocs Command:
    • I executed the following command:
      mkdocs serve

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.

@vedranmiletic
Copy link
Contributor Author

@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.

@vedranmiletic
Copy link
Contributor Author

@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.

@katarinasupe katarinasupe added the type: docs Improvements or additions to documentation label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants