Skip to content

Document how to customize appearance of DocC docs #359

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

Merged
merged 36 commits into from
Sep 23, 2022

Conversation

mportiz08
Copy link
Contributor

Bug/issue #, if applicable: 96977013

Summary

This adds an Open API reference specification for the theme-settings.json file and adds a new article to the DocCDocumentation.docc catalog titled "Customizing Your Documentation Appearance", which explains how the file can be used for theming purposes, with examples and screenshots.

Dependencies

Not an explicit dependency, but this work is synced to the implementation of the Swift-DocC-Render work in swiftlang/swift-docc-render#402

Testing

Run bin/preview-docs DocC to view the new article, and the new Open API spec file can be manually inspected.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests (documentation changes only)
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

mportiz08 added 28 commits July 21, 2022 15:00
Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

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

Hey Marcus, this looks great. ComicSans was a nice touch 😏

Can we add as section about Icons? I think those are quite cool and have a tricky moment we need to explain.

@mportiz08
Copy link
Contributor Author

Hey Marcus, this looks great. ComicSans was a nice touch 😏

Can we add as section about Icons? I think those are quite cool and have a tricky moment we need to explain.

I completely forgot to write the section about icons, but I was planning on it. Thanks for the reminder!

@mportiz08
Copy link
Contributor Author

Hey Marcus, this looks great. ComicSans was a nice touch 😏
Can we add as section about Icons? I think those are quite cool and have a tricky moment we need to explain.

I completely forgot to write the section about icons, but I was planning on it. Thanks for the reminder!

Added: 3ed0578

Copy link
Contributor

@franklinsch franklinsch left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for putting this together! I have a few comments but generally this looks good to me.

mportiz08 and others added 3 commits August 12, 2022 10:02
Co-authored-by: Franklin Schrans <[email protected]>
Co-authored-by: Franklin Schrans <[email protected]>
Co-authored-by: Franklin Schrans <[email protected]>
@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Aug 14, 2022

A small suggestion: This PR adds about 1MB's image file to the swift-docc repo which is not very friendly for developers with poor network status.

Could we change some of them with external links(Supported since #82)

Since currently, we do not support dark varients for external link images

Or compress the images first before committing them to git with some services like https://tinypng.com ? (Maybe we'll get only 100KB increase after doing the compression)

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Aug 16, 2022

A small suggestion: This PR adds about 1MB's image file to the swift-docc repo which is not very friendly for developers with poor network status.

Could we change some of them with external links(Supported since #82)

Since currently, we do not support dark varients for external link images

Or compress the images first before committing them to git with some services like tinypng.com ? (Maybe we'll get only 100KB increase after doing the compression)

After confirming the current status of swift-docc repo (swift-docc's Assets has about 15MB of image resources), I will take back my previous suggestion.

Based on the current status of picture resources size, I think this PR's increase is acceptable.

@mportiz08
Copy link
Contributor Author

A small suggestion: This PR adds about 1MB's image file to the swift-docc repo which is not very friendly for developers with poor network status.
Could we change some of them with external links(Supported since #82)

Since currently, we do not support dark varients for external link images

Or compress the images first before committing them to git with some services like tinypng.com ? (Maybe we'll get only 100KB increase after doing the compression)

After confirming the current status of swift-docc repo (swift-docc's Assets has about 15MB of image resources), I will take back my previous suggestion.

Based on the current status of picture resources size, I think this PR's increase is acceptable.

Even if we merge this as-is soon, it may be good to look into possibly externalizing all of these assets in the future like you suggest. Thanks @Kyle-Ye!

@franklinsch
Copy link
Contributor

@mportiz08 Any remaining work here before we merge?

@mportiz08
Copy link
Contributor Author

@mportiz08 Any remaining work here before we merge?

No, but I'm hoping to time the merge along with the merge of the swift-docc-render implementation PR (which is also pretty much wrapped up, but we are doing more testing before merging).

@mportiz08
Copy link
Contributor Author

@swift-ci test

@mportiz08 mportiz08 merged commit 5fe2d13 into swiftlang:main Sep 23, 2022
@mportiz08 mportiz08 deleted the document-theme-settings branch September 23, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants