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

Project documentation website #1017

Merged
merged 10 commits into from
Oct 3, 2023
Merged

Project documentation website #1017

merged 10 commits into from
Oct 3, 2023

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Apr 21, 2023

No description provided.

Copy link
Collaborator

@lmb lmb left a comment

Choose a reason for hiding this comment

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

This is great, and we should push it ASAP. Like I mentioned on our call, my main concern is that we nail down what kind of person we write for. As an example, some of the concepts pages explain both really basic Go things and "super advanced" finalizer stuff. I think that this makes the content less useful to both the less and the more advanced readers. In the best case we can build a "ladder" where our typical reader comes in and can go from basic to ever more complex pages.

I'd prefer if we'd start by writing for someone like this:

  • A good grasp of the Go language, with an understanding of best practises. Able to write idiomatic Go. To me that implies being able to deal with os resources: read a file, open a socket.
  • A basic grasp of C. Did some coding in uni or wherever. No need to explain the syntax of a function call or arithmetic.
  • Prior knowledge of ebpf.io/what-is-ebpf.
  • No knowledge of Go runtime internals.
  • No knowledge of Linux kernel internals.
  • No knowledge of C compiler specifics like magic macros, attributes, etc.

The first step in the ladder would be to get that person productive when using the lib. The second step would be to get that person ready to contribute.

docs/ebpf.py Outdated Show resolved Hide resolved
docs/ebpf.py Outdated Show resolved Hide resolved
docs/examples/getting_started/getting_started Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
docs/ebpf.py Outdated Show resolved Hide resolved
docs/ebpf/guides/getting-started.md Outdated Show resolved Hide resolved
docs/ebpf/guides/getting-started.md Show resolved Hide resolved
docs/ebpf/guides/getting-started.md Show resolved Hide resolved
docs/ebpf/guides/getting-started.md Outdated Show resolved Hide resolved
docs/examples/Makefile Outdated Show resolved Hide resolved
@ti-mo ti-mo force-pushed the tb/docs branch 10 times, most recently from 2dce778 to 8c84560 Compare September 28, 2023 15:03
@ti-mo ti-mo marked this pull request as ready for review September 28, 2023 15:16
Signed-off-by: Timo Beckers <timo@isovalent.com>
Explained in comments. Minimal impact to existing .c code, but makes
rendered code blocks in markdown easier to read.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This allows docs and examples to depend on <bpf/bpf_helpers.h> and friends,
reducing the amount of actions needed for newcomers to get up and running.

Signed-off-by: Timo Beckers <timo@isovalent.com>
As of Go 1.21:

go build ./... seems to build all main subpackages discarding output binaries.
go test -c -o /dev/null also works as expected.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This commit introduces an mkdocs-based documentation boilerplate, containing:

- The mkdocs configuration (mkdocs.yml), defining the site's navigation and ToC
- Python dependency management using pipenv
- Netlify configuration for automated builds & deploys
- eBee emoji
- Macros for easily including real code examples into documentation. These
  examples get built in CI, ensuring they don't rot when API or dependencies
  change.
- A glossary for commonly-used terms in BPF land.
- Custom admonition for rendering warnings about incomplete documentation
  sections using '!!! incomplete'.

Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
This patch adds deep-dives on ELF loading, object lifecycle, resource
limits and ELF section naming. Illustrated by a few C and Go examples.

Add a note to elf_reader.go to keep the ELF section prefix table up to date.

Signed-off-by: Timo Beckers <timo@isovalent.com>
We want to write about bpf2go, BTF, feature probing, and working with maps
and programs. Add a few writing prompts to help prospective authors to get
started.

Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
This patch includes an override of a partial that supports hiding the title
to create a nicer-looking landing page. Otherwise, mkdocs-material always
renders an <h1> if we specify a custom <p> for a tagline graphic.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo merged commit fe03e6e into cilium:main Oct 3, 2023
14 checks passed
@ti-mo ti-mo deleted the tb/docs branch October 3, 2023 15:24
@ti-mo ti-mo mentioned this pull request Oct 4, 2023
8 tasks
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.

None yet

2 participants