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

POC: Add PyGMT logo to README & docs #3845

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Mar 11, 2025

Description of proposed changes

Since we now have a logo (#1404) we should think about in which format we want to place it in our README/docs. I would suggest to use the horizontal one. Would also suggest to add the subtitle A Python interface for the Generic Mapping Tools. Maybe @sfrooti may add that to the prepared logos. Also need to increase the resolution. Finally, the yellow lines do not really stand out from the background.

  • Landing page
  • Sidebar
  • Favicon
  • GitHub README

Previews:

https://pygmt-dev--3845.org.readthedocs.build/en/3845/


Landig page

Screenshot 2025-03-17 at 11 55 04

Favicon (tab icon)

Screenshot 2025-03-17 at 11 55 18

GitHub README

screen_pygmt

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Mar 11, 2025
@michaelgrund michaelgrund marked this pull request as draft March 11, 2025 08:25
@michaelgrund michaelgrund changed the title POC: Add PyGMT logo to README POC: Add PyGMT logo to README & docs Mar 11, 2025
@seisman
Copy link
Member

seisman commented Mar 11, 2025

Thanks for opening the PR so that we can better preview what the logo looks like on the web or PDF. Just want to note that the logo is not finalized yet, and we may tweak the logo based on the community responses.

@seisman
Copy link
Member

seisman commented Mar 12, 2025

@michaelgrund Please help replace the favicon doc/_static/favicon.png, and also maybe add a logo to the title at the sidebar by setting html_logo to an image path in doc/conf.py.

@michaelgrund michaelgrund marked this pull request as ready for review March 14, 2025 08:39
@michaelgrund
Copy link
Member Author

@michaelgrund Please help replace the favicon doc/_static/favicon.png, and also maybe add a logo to the title at the sidebar by setting html_logo to an image path in doc/conf.py.

Not sure if it works with direct URL references like I did.

@seisman
Copy link
Member

seisman commented Mar 15, 2025

@michaelgrund Please help replace the favicon doc/_static/favicon.png, and also maybe add a logo to the title at the sidebar by setting html_logo to an image path in doc/conf.py.

Not sure if it works with direct URL references like I did.

It seems not working. Could you please add the static images to the repository instead? The PyGMT banner on the landing page also needs to be updated

pygmt/doc/index.md

Lines 4 to 10 in eb0ebe7

<div class="banner">
<h1>PyGMT<h1>
<h2>
A Python interface for the
<a href="https://www.generic-mapping-tools.org/">Generic Mapping Tools</a>
</h2>
</div>

@michaelgrund
Copy link
Member Author

FYI, currently the original images stored in @sfrooti's repo are saved in our doc/_static/. When the logo refinements are done I suggest to generate the needed versions as static pngs and store them instead of the currently used ones.

Co-authored-by: Dongdong Tian <[email protected]>
@seisman seisman marked this pull request as draft March 18, 2025 06:39
@michaelgrund michaelgrund marked this pull request as ready for review March 18, 2025 08:10
@michaelgrund michaelgrund marked this pull request as draft March 18, 2025 08:10
@seisman
Copy link
Member

seisman commented Mar 19, 2025

@michaelgrund I've pushed a commit to this branch to display the logo in the sidebar. Now the landing page looks like below:

image

The logo in the sidebar will look better if the background is transparent.

@@ -30,27 +30,6 @@
{% endif %}
{% endblock %}


{% block sidebartitle %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/readthedocs/sphinx_rtd_theme/blob/5a263753d52c1628c88392fbf52c729f5a8e79b5/sphinx_rtd_theme/layout.html#L114-L139

For reference, the above link is the default template for the sidebartitle block in the sphinx_rtd_theme.

Removing the custom sidebartitle block may make the version selector disappear (#3542), so we need to update this block instead of removing it.

@michaelgrund
Copy link
Member Author

@michaelgrund I've pushed a commit to this branch to display the logo in the sidebar. Now the landing page looks like below:

image

The logo in the sidebar will look better if the background is transparent.

Great thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants