-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move zarf-docs website into the zarf repository
- Loading branch information
Showing
71 changed files
with
27,962 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
public | ||
static | ||
.cache | ||
content | ||
.history | ||
dist | ||
docs | ||
_debug.js | ||
_deploy.js | ||
__mocks__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"extends": [ | ||
"airbnb", | ||
"prettier", | ||
"react-app", | ||
"react-app/jest", | ||
"plugin:testing-library/react", | ||
"plugin:jest-dom/recommended" | ||
], | ||
"plugins": [ | ||
"prettier", | ||
"react-hooks", | ||
"etc", | ||
"jest", | ||
"jest-dom", | ||
"testing-library" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.js" | ||
] | ||
} | ||
], | ||
"env": { | ||
"jest/globals": true | ||
}, | ||
"ignorePatterns": [ | ||
"/build/**/*.js", | ||
"cypress/*" | ||
], | ||
"rules": { | ||
"semi": 0, | ||
"etc/no-commented-out-code": "error", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"semi": false, | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ | ||
"extensions": [ | ||
".js", | ||
".jsx" | ||
] | ||
} | ||
], | ||
"react/jsx-props-no-spreading": "off", | ||
"react/prop-types": [ | ||
"error" | ||
], | ||
"no-underscore-dangle": 0, | ||
"import/imports-first": [ | ||
"error", | ||
"absolute-first" | ||
], | ||
"import/newline-after-import": "error", | ||
"import/no-cycle": [ | ||
2, | ||
{ | ||
"maxDepth": 1 | ||
} | ||
], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": true | ||
} | ||
], | ||
"react-hooks/rules-of-hooks": "error", // Check rules of hooks | ||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies | ||
"react/forbid-prop-types": "off", | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"jest/no-mocks-import": "off" | ||
}, | ||
"globals": { | ||
"window": true, | ||
"document": true, | ||
"localStorage": true, | ||
"FormData": true, | ||
"FileReader": true, | ||
"Blob": true, | ||
"navigator": true | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"paths": [ | ||
"src" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Code Editor | ||
.vscode/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public | ||
static | ||
.cache | ||
.history | ||
dist | ||
coverage | ||
docs/app | ||
__mocks__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": "stylelint-config-recommended-scss", | ||
"rules": { | ||
"color-named": "never", | ||
"font-family-name-quotes": "always-where-required", | ||
"font-weight-notation": "named-where-possible", | ||
"function-url-no-scheme-relative": true, | ||
"function-url-quotes": "always", | ||
"string-quotes": "single", | ||
"value-keyword-case": "lower", | ||
"unit-blacklist": [], | ||
"max-empty-lines": 2, | ||
"no-descending-specificity": true, | ||
"no-duplicate-selectors": true, | ||
"font-family-no-missing-generic-family-keyword": null, | ||
"property-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreProperties": ["/^lost-/"] | ||
} | ||
] | ||
}, | ||
"ignoreFiles": ["node_modules/*", "src/assets/**"], | ||
"defaultSeverity": "error" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Zarf - Docs Site | ||
|
||
[![Zarf Slack Channel](https://img.shields.io/badge/k8s%20slack-zarf-40a3dd)](https://kubernetes.slack.com/archives/C03B6BJAUJ3) | ||
[![Zarf Website](https://img.shields.io/badge/web-zarf.dev-6d87c3)](https://zarf.dev/) | ||
[![Zarf Documentation](https://img.shields.io/badge/docs-docs.zarf.dev-775ba1)](https://docs.zarf.dev/) | ||
|
||
This is the docs site for [Zarf](https://github.com/defenseunicorns/zarf), a declarative air gap solution for Kubernetes. This site is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator created by Facebook. | ||
|
||
### Prerequisites | ||
|
||
This site requires `nodejs` and `npm` so install it if you haven't already. | ||
|
||
``` shell | ||
# FOR LINUX (Ubuntu) | ||
$ sudo apt update | ||
$ sudo apt install nodejs | ||
$ sudo apt install npm | ||
|
||
# FOR MAC (Homebrew) | ||
$ brew install nodejs | ||
``` | ||
|
||
### Installation | ||
|
||
To install required dependencies run the following: | ||
|
||
``` shell | ||
$ npm ci | ||
``` | ||
|
||
### Updating Zarf `docs` Files | ||
|
||
The markdown files for Zarf are held in the main Zarf repo and are pulled into this repo using a submodule. The current versions will be cloned as part of the `postinstall` script. To update the reference to those docs run the following command: | ||
|
||
``` shell | ||
$ git submodule update --remote --recursive main | ||
``` | ||
|
||
To checkout a specific tag within the submodule you can do the following after updating: | ||
|
||
``` shell | ||
$ cd main | ||
$ git checkout <tag> | ||
$ cd .. | ||
``` | ||
|
||
You may also find it useful to switch to a different branch for the submodule. You can do this by adding a `branch` to `.gitmodules`: | ||
|
||
``` | ||
[submodule "main"] | ||
path = main | ||
url = https://github.com/defenseunicorns/zarf.git | ||
branch = <your-branch-here> | ||
``` | ||
|
||
### Running | ||
|
||
There are two ways to run the site locally, the simplest being the following: | ||
|
||
``` shell | ||
$ npm run start | ||
``` | ||
|
||
This will open a browser window that will let you see the built site. | ||
|
||
> ⚠️ *Note, `npm run start` will not perform some link checking or build the search index.* | ||
To perform a full build and to run it locally you should run the following: | ||
|
||
``` shell | ||
$ npm run build | ||
$ npm run serve | ||
``` | ||
|
||
### Deployment | ||
|
||
To deploy the site, push your changes into a branch and open a PR. [Netlify](https://www.netlify.com/) will generate a preview for you and a PR approver to see your changes. Once the approver is happy with the changes they can approve and merge the PR and it will be pushed to production. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
Oops, something went wrong.