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

docs: migrate README to MkDocs #884

Merged
merged 18 commits into from
Mar 17, 2021
Merged

docs: migrate README to MkDocs #884

merged 18 commits into from
Mar 17, 2021

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Mar 11, 2021

Overview

This PR migrates README to MkDocs. MkDocs manages two streams:

  • dev
    • sync with themain branch
    • include features not released yet
  • latest
    • alias to the latest version released such as v0.16.0
    • aquasecurity.github.io/trivy redirects to latest

GitHub Pages

https://aquasecurity.github.io/trivy/latest/

References

https://squidfunk.github.io/mkdocs-material/reference/admonitions/

@knqyf263 knqyf263 added the kind/documentation Categorizes issue or PR as related to documentation. label Mar 11, 2021
@knqyf263 knqyf263 self-assigned this Mar 11, 2021
@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #884 (098a322) into main (a00d719) will decrease coverage by 6.69%.
The diff coverage is 76.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #884      +/-   ##
==========================================
- Coverage   68.50%   61.80%   -6.70%     
==========================================
  Files          57       65       +8     
  Lines        2210     2579     +369     
==========================================
+ Hits         1514     1594      +80     
- Misses        564      849     +285     
- Partials      132      136       +4     
Impacted Files Coverage Δ
pkg/detector/library/detect.go 0.00% <0.00%> (ø)
pkg/detector/library/npm/compare.go 100.00% <ø> (ø)
pkg/detector/ospkg/alpine/alpine.go 94.73% <ø> (ø)
pkg/detector/ospkg/debian/debian.go 81.63% <ø> (ø)
pkg/detector/ospkg/ubuntu/ubuntu.go 64.86% <ø> (ø)
pkg/github/github.go 58.00% <0.00%> (ø)
pkg/rpc/server/listen.go 59.15% <ø> (-7.52%) ⬇️
pkg/utils/utils.go 48.21% <ø> (+8.50%) ⬆️
pkg/detector/library/driver.go 39.21% <26.92%> (-7.46%) ⬇️
pkg/detector/ospkg/amazon/amazon.go 88.37% <50.00%> (+0.13%) ⬆️
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b3b5d0...098a322. Read the comment docs.

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

I left a few comments to start with, but overall

docs/examples/skip.md Show resolved Hide resolved
docs/further.md Outdated Show resolved Hide resolved
docs/further.md Outdated Show resolved Hide resolved
docs/further.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
knqyf263 and others added 9 commits March 14, 2021 07:52
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
@knqyf263
Copy link
Collaborator Author

I suggest that we define a Makefile target to preview the docs locally. See for example https://github.com/aquasecurity/starboard/blob/main/Makefile#L126

This PR was already big, so I thought I should add it in another PR. But I've added here.
a394d54

We should use relative links to Markdown sources instead of absolute URLs

I didn't know MkDocs also supports relative links. Thanks!

In installation section I think it's worth using macros plugin and define a variable that holds the current release version and refer to that. See for example https://github.com/aquasecurity/starboard/blob/main/mkdocs.yml#L60

You can see what I did here.

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

LGTM!

Makefile Outdated
@@ -5,6 +5,9 @@ GOPATH=$(shell go env GOPATH)
GOBIN=$(GOPATH)/bin
GOSRC=$(GOPATH)/src

MKDOCS_IMAGE := aquasec/mkdocs-material:starboard
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT You may want to rename tag to dev or trivy

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My bad... Done 098a322

@knqyf263 knqyf263 merged commit f5b060a into main Mar 17, 2021
@knqyf263 knqyf263 deleted the slim_readme branch March 17, 2021 05:19
sishbi pushed a commit to sishbi/trivy that referenced this pull request Mar 29, 2021
* docs: slim README

* docs: add images

* docs: update README

* docs: add futher reading

* docs: add docs for maintainers

* docs: fix links

* docs: add notes

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* docs: update mkdocs.yml

* chore: add a mkdocs target to Makefile

* docs(installation): use git.tag

* chore(Makefile): fix the tag of the mkdocs image

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
liamg pushed a commit that referenced this pull request Jun 7, 2022
* docs: slim README

* docs: add images

* docs: update README

* docs: add futher reading

* docs: add docs for maintainers

* docs: fix links

* docs: add notes

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/further.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* Update docs/index.md

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>

* docs: update mkdocs.yml

* chore: add a mkdocs target to Makefile

* docs(installation): use git.tag

* chore(Makefile): fix the tag of the mkdocs image

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants