Skip to content

Commit

Permalink
update blog menu and files (knative#4783)
Browse files Browse the repository at this point in the history
* update blog menu and files

Signed-off-by: Carlos Santana <[email protected]>

* addressed review comments

Signed-off-by: Carlos Santana <[email protected]>
  • Loading branch information
csantanapr authored Feb 25, 2022
1 parent 8084e65 commit a3e3eeb
Show file tree
Hide file tree
Showing 26 changed files with 86,410 additions and 22 deletions.
1 change: 1 addition & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor/*
third_party/*
*-lock.json
*.svg
35 changes: 17 additions & 18 deletions blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ The Knative website has a basic, top-level navigation that looks like this:
```yaml
nav:
- Home:
- Getting started:
- Tutorial:
- Installing:
- Serving:
- Eventing:
- Code samples:
- Reference:
- Community:
- About:
- Blog:
- Case studies:
- Community:
```
Currently, we maintain two different copies of the navigation.
Expand All @@ -24,25 +23,26 @@ Currently, we maintain two different copies of the navigation.
The main one, for the website as a whole, is located at [`docs/config/nav.yml`](docs/config/nav.yml) and contains the links for all the subject matter except for the Blog and Community pages. It uses relative links for everything except the Blog / Community, for example:

```yaml
- Getting started:
- Tutorial:
- Knative Quickstart: getting-started/README.md
- Using Knative Serving:
- First Knative Service: getting-started/first-service.md
- Scaling to Zero: getting-started/first-autoscale.md
- Traffic Splitting: getting-started/first-traffic-split.md
```

Note here that each link assumes that the present working directory is `docs/docs/`, so for example the "Getting Started" README which is located in `docs/docs/getting-started/README.md` is listed as `getting-started/README.md`
Note here that each link assumes that the present working directory is `docs/docs/`, so for example the "Tutorial" README which is located in `docs/docs/getting-started/README.md` is listed as `getting-started/README.md`

The Blog and Community pages instead use absolute links to their sections:
The Blog pages instead use absolute links to its sections:

```yaml
- About:
- Testimonials: about/testimonials.md
- Case studies:
- deepc: about/case-studies/deepc.md
- Outfit7: about/case-studies/outfit7.md
- Puppet: about/case-studies/puppet.md
- Blog: /blog/
- Case Studies:
- deepc: about/case-studies/deepc.md
- Outfit7: about/case-studies/outfit7.md
- Puppet: about/case-studies/puppet.md
- Community: /community/
```

Note that the Blog link is `/blog/` and not `blog/` (and similar for the community site).
Expand All @@ -56,29 +56,28 @@ In order to do this, we essentially have a separate mkdocs site for the blog tha
```yaml
nav:
- Home: /docs/
- Getting started: /docs/getting-started/
- Tutorial: /docs/getting-started/
- Installing: /docs/install/
- Serving: /docs/serving/
- Eventing: /docs/eventing/
- Code samples: /docs/samples/
- Reference: /docs/reference/
- About: /docs/about/
- Community: /docs/community/
- About: /docs/about/testimonials
- Blog:
- index.md
- Releases:
- releases/announcing-knative-v0-26-release.md
- releases/announcing-knative-v0-25-release.md
- releases/announcing-knative-v0-24-release.md
...
- Case studies: /docs/about/case-studies/deepc
- Community: /community/
```

A couple of key points:

* The basic, high-level sections are the same as for the main site (Home, Getting started, etc.).
* The basic, high-level sections are the same as for the main site (Home, Tutorial, etc.).

* The blog requires absolute links for all sections not in the blog. For example, the Getting started section link is `/docs/getting-started/` for the blog site (whereas it was simply `getting-started/` for the main site). Also note that for the blog, we don't need to link to a specific file, as each of those directories has a README that gets redirected to.
* The blog requires absolute links for all sections not in the blog. For example, the Tutorial section link is `/docs/getting-started/` for the blog site (whereas it was simply `getting-started/` for the main site). Also note that for the blog, we don't need to link to a specific file, as each of those directories has a README that gets redirected to.

* For the blog, we use relative links, with `docs/blog/docs/` as the present working directory.

Expand All @@ -90,7 +89,7 @@ When a new blog post is created, it will also need to be added to the blog navig

If a major change to the site navigation is made (for example, adding a new section to the top navigation tabs), then the change will need to be made in both `docs/config/nav.yml` and `docs/blog/config/nav.yml`.

For changes that are not top-level (i.e. adding a subsection to the "Getting started" guide or creating a new category of blog post), the change only needs to be made in the relevant section, as it's invisible to the other (for example, the subsection of the "Getting started" guide only needs to be made in `docs/config/nav.yml`)
For changes that are not top-level (i.e. adding a subsection to the "Tutorial" guide or creating a new category of blog post), the change only needs to be made in the relevant section, as it's invisible to the other (for example, the subsection of the "Tutorial" guide only needs to be made in `docs/config/nav.yml`)

## Common files between main site and blog, also known as non nav.yml files

Expand Down
6 changes: 3 additions & 3 deletions blog/config/nav.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
nav:
- Home: /docs/
- Getting started: /docs/getting-started/
- Tutorial: /docs/getting-started/
- Installing: /docs/install/
- Serving: /docs/serving/
- Eventing: /docs/eventing/
- Code samples: /docs/samples/
- Reference: /docs/reference/
- "Community": /docs/community/
- About: /docs/about/testimonials
- Community: /docs/community/
- About: /docs/about/testimonials/
#####################################################
# Blog
#####################################################
Expand Down
Loading

0 comments on commit a3e3eeb

Please sign in to comment.