docs/blog
Gabriel Freites f63695c5c6
New home design (#4715)
* added headline section to home, still some details to polish

* added need to know more section, removed old sections and started why serverless section

* finishing sections content and build up + still some css polishing to do

* header changes according to the design

* header changes according to the design

* fixing lint

* fixed some responsiveness and css issues and finished case studies and kantive components sections

* added remaining assets and formated home css

* extra css changes to maintain consistency throughout the site

* almost done with the why serverless section + some more style changes to improve responsiveness

* improved font sizes and responsivenes in titles + just the whats next section to go and some adjustments in the on hover changing images

* ready for the first pass, waiting on the missing icon to finish

* added resources and last detaisl

* removed unused svgs and that were causing reviewdog errors

* improved scale transform animation on home images

* fixing pr comments

* corrected the dkblue autoscaling image with the right png
2022-02-15 08:24:00 -08:00
..
config Add release notes to blog for 1.2 (#4675) 2022-01-28 13:41:47 -08:00
docs add pvc support to release notes 1.2 (#4704) 2022-02-07 04:23:53 -08:00
OWNERS Update OWNERS_ALIASES to match autogen in community (#3406) 2021-04-06 16:58:49 -07:00
README.md update instructions on creating blog posts (#4587) 2021-12-17 04:33:25 -08:00
mkdocs.yml New home design (#4715) 2022-02-15 08:24:00 -08:00

README.md

Updating the Knative Blog

The Knative website has a basic, top-level navigation that looks like this:

nav:
    - Home:
    - Getting started:
    - Installing:
    - Serving:
    - Eventing:
    - Code samples:
    - Reference:
    - Blog:
    - Case studies:
    - Community:

Currently, we maintain two different copies of the navigation.

docs/config/nav.yml

The main one, for the website as a whole, is located at 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:

    - Getting started:
        - 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

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

    - 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).

docs/blog/config/nav.yml

The blog is actually a separate, self-contained site that is accessible from the main docs page. We do this partly because the blog is not versioned like the docs (i.e. tied to a specific release) and partly to make the left sidebar navigation look clean (i.e. only display blog posts on the blog site).

In order to do this, we essentially have a separate mkdocs site for the blog that gets copied over into the main site. This is done using the hack/build.sh script. While we try to copy over as many files as possible from the main site (to avoid duplicating configuration / html / stylesheets / etc), our nav.yml file (located at docs/blog/config/nav.yml) is unique to the blog site.

nav:
    - Home: /docs/
    - Getting started: /docs/getting-started/
    - Installing: /docs/install/
    - Serving: /docs/serving/
    - Eventing: /docs/eventing/
    - Code samples: /docs/samples/
    - Reference: /docs/reference/
    - 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 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.

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

Updating the blog

When a new blog post is created, it will also need to be added to the blog navigation (i.e. to docs/blog/config/nav.yml) in the appropriate section.

Updating the site navigation

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)

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

All files in docs/overrides, docs/images, and docs/stylesheets are copied to the blog at build-time.

What this means is that any changes to files in those directories (for example, updating the main site layout editing docs/stylesheets/extra.css) will go live on the blog as soon as those changes are pushed to main. In contrast, on the main site those changes will appear in the development branch and only go live when they are cherry-picked into the current release branch.