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

create documentation microsite #56

Merged
merged 7 commits into from
Jan 20, 2022
Merged

create documentation microsite #56

merged 7 commits into from
Jan 20, 2022

Conversation

lewisjkl
Copy link
Contributor

@lewisjkl lewisjkl commented Jan 18, 2022

Moves the current README into a docs project with mdoc setup. From there adds a docusaurus microsite. Colors/copy/etc can all be changed of course, I just went with what made sense off the top of my head.

This will make it so the microsite is pushed to a new branch gh-pages. We will need to set this branch to be the github pages page in the settings for this repo.

@lewisjkl
Copy link
Contributor Author

CleanShot 2022-01-18 at 16 26 31
Looks majorly sus lol I promise it is just the yarn.lock file 😆


- name: Compile Documentation Markdown Files
if: startsWith(github.ref, 'refs/tags/v') # do not run for snapshots
run: sbt "docs/mdoc"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not positive this is needed here since we run it above in the CI steps. I am just not sure if the results will be cached along with the other compilation artifacts

Copy link
Member

Choose a reason for hiding this comment

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

Seems worth checking, if we can avoid running sbt I'd give it a try :)

@lewisjkl
Copy link
Contributor Author

CleanShot 2022-01-18 at 16 30 23
This is what it looks like right now, happy to tweak the settings or we can go with this for now and adjust down the road.


- name: Compile Documentation Markdown Files
if: startsWith(github.ref, 'refs/tags/v') # do not run for snapshots
run: sbt "docs/mdoc"
Copy link
Member

Choose a reason for hiding this comment

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

Seems worth checking, if we can avoid running sbt I'd give it a try :)

.github/workflows/ci.yml Show resolved Hide resolved
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Get Started - 5min ⏱️
Copy link
Member

Choose a reason for hiding this comment

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

lmao, I always thought this time estimation was generated 😂

@kubukoz
Copy link
Member

kubukoz commented Jan 19, 2022

It'd be sick if we could generate previews for changes in the microsite. Any chance we can integrate with Netlify in some github action?

description: (
<>
Smithy4s will generate Scala code from your Smithy files. This means your servers
and clients will be generated from the same source of truth.
Copy link
Member

Choose a reason for hiding this comment

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

I'd add a newline and mention that the generated code contains precise metadata about the types, which allows building tooling on top of Smithy4s. Maybe with some examples of potential ideas like CLIs

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll change it ^^

@Baccata
Copy link
Contributor

Baccata commented Jan 19, 2022

It'd be sick if we could generate previews for changes in the microsite. Any chance we can integrate with Netlify in some github action?

@kubukoz I wouldn't mind it, preferably in a later unit of work. I'm currently revising (and making changes) to the docs content, so please do not touch the modules/docs folder if you're gonna touch this PR 😄

Copy link
Contributor Author

@lewisjkl lewisjkl left a comment

Choose a reason for hiding this comment

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

A few nitpicks, but the changes you made look good @Baccata 🚀

modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/01-intro.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/02-traits.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/03-editor-support.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/01-intro.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/01-intro.md Show resolved Hide resolved
modules/docs/src/01-overview/01-intro.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/02-sbt.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/03-cli.md Outdated Show resolved Hide resolved
Comment on lines 61 to 66






Copy link
Member

Choose a reason for hiding this comment

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

nit: lots of whitespace. Someone should enable trimming trailing newlines in their editors :D

modules/docs/src/02-the-smithy-idl/03-editor-support.md Outdated Show resolved Hide resolved

The code generated by smithy4s is strictly **protocol agnostic**, meaning that there is no particular processing to handle HTTP semantics, or JSON semantics in the generated code.

Instead, smithy4s relies on a number of highly polymorphic interfaces to communicate with the generated code, and derive JSON codecs out of it, or turn high level user provided code into HTTP services. But in theory, the same generated code can be used conjointly with other serialisation technologies (protobuf for instance) and protocols (gRPC).
Copy link
Member

Choose a reason for hiding this comment

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

nit: I feel like the word metadata should appear somewhere here


## Semantics

In this protocol, the values in shapes are bound to http metadata or body according to the specification of the [Http Binding traits](https://awslabs.github.io/smithy/1.0/spec/core/http-traits.html?highlight=http#http-binding-traits). However, the `@mediaType` trait has no incidence, and all bodies (when present) are serialised in JSON.
Copy link
Member

Choose a reason for hiding this comment

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

should we mention jsoniter here?

@kubukoz
Copy link
Member

kubukoz commented Jan 19, 2022

preview at this point: https://61e860c575fc0167da5ae8ca--competent-tereshkova-bd73e4.netlify.app/

Co-authored-by: Jakub Kozłowski <jakub.kozlowski@disneystreaming.com>
This was referenced Jan 20, 2022
modules/docs/src/03-protocols/03-aws/01-aws.md Outdated Show resolved Hide resolved
modules/docs/src/01-overview/02-sbt.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/02-traits.md Outdated Show resolved Hide resolved
modules/docs/src/02-the-smithy-idl/01-smithy-idl.md Outdated Show resolved Hide resolved
modules/website/src/components/HomepageFeatures.js Outdated Show resolved Hide resolved
Baccata and others added 2 commits January 20, 2022 14:36
Co-authored-by: Jakub Kozłowski <jakub.kozlowski@disneystreaming.com>
Co-authored-by: Jakub Kozłowski <jakub.kozlowski@disneystreaming.com>
@Baccata Baccata merged commit 5a9f9ba into main Jan 20, 2022
@Baccata Baccata deleted the microsite branch January 20, 2022 13:53
Baccata added a commit that referenced this pull request May 10, 2022
Adds a documentation microsite, and moves most contents of the readme over to the site 

Co-authored-by: Olivier Mélois <baccata64@gmail.com>
Co-authored-by: Jakub Kozłowski <jakub.kozlowski@disneystreaming.com>
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.

3 participants