Giter VIP home page Giter VIP logo

profiles-userdocs's Introduction

Archived. Profiles work has moved to https://github.com/weaveworks/weave-gitops

Profiles website

This website is built using Docusaurus 2, a modern static website generator.

Contents

Local Development

From project root

From the root profiles directory you can simply run make local-docs. This command installs required packages, starts a local development server and opens up a browser window at localhost:3000. Most changes are reflected live without having to restart the server.

From userdocs

Ensure you are in userdocs, and run:

yarn install

followed by

yarn start

Note: if you are running this command from here any autogenerated files will not be created and you may see rendering errors, or missing or blank pages. See below for more details.

To generate static content into the build directory which can be served using any static contents hosting service, run:

yarn build

Deployment

Automated

The docs are automatically deployed as part of a Github Action, found currently at profiles/.github/workflows/deploy-docs.yaml.

They run at https://profiles.dev/.

Manual

You should not need to do this, as we automatically deploy the docs on release, but if for whatever reason you need to deploy manually, and if you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

Autogenerated docs

The following pages are generated on the fly to save us from having to update docs with every small change:

  • Everything in /docs/pctl/
  • /docs/author-docs/profile-definition-schema.mdx
  • /docs/catalog-docs/catalog-source-schema.mdx

pctl command help generation

Both the deploy action and make local-docs will run pctl docgen to create individual pages for pctl <command> --help output at the correct location to be rendered in the docs.

The docgen command outputs a markdown file for each user-facing command.

$ pctl docgen --help
NAME:
   pctl docgen - generate the cli doc pages

USAGE:
   pctl docgen --out <relative-path-of-dir-to-write-docs>

OPTIONS:
   --path value  The relative path to write the docs out. Default: pwd.
   --help, -h    show help (default: false)

Schema generation

The JSON schemas for ProfileDefinition and ProfileCatalogSource are created using the cmd/schema package in profiles. The command will parse the given Go object, strip out any irrelevant data, and generate a schema v7 JSON file. Both the deploy action and the make local-docs will run this and ensure the files get generated in the correct location.

The schemas are then rendered to look a bit like yaml by src/components/Schema.js in the docs directory.

$ go run cmd/schema/main.go
Usage: schema <object-name> <outfile>

profiles-userdocs's People

Contributors

morancj avatar skarlso avatar weaveworks-admin-bot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.