Skip to content

Commit 85dc8a3

Browse files
authored
Merge pull request #22 from devfile/fix-redirect
Fixes redirect and updates readme
2 parents ed5fb47 + e8d6b42 commit 85dc8a3

File tree

11 files changed

+320
-197
lines changed

11 files changed

+320
-197
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/dist

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
**/*.yaml
77
**/generated/
88
**/snippet.*
9+
**/dist

README.md

Lines changed: 6 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -4,176 +4,28 @@ Monorepo for web related devfile projects
44

55
## Getting started
66

7+
This project uses [`yarn`](https://classic.yarnpkg.com/lang/en/docs/install).
8+
79
It is highly recommended to download the [Nx Console](https://nx.dev/using-nx/console#download) extension for your IDE if available.
810

9-
### Workspace commands
11+
## Workspace commands
1012

1113
Run `yarn install` to download dependencies.
1214

13-
#### Specific project commands
15+
### Specific project commands
1416

1517
- `yarn nx serve <project-name> --configuration=<development | production>`: serves the project's application
1618
- `yarn nx build <project-name> --configuration=<development | production>`: builds the project's application
1719
- `yarn nx run <project-name>:export`: exports the project's application to be static
1820
- `yarn nx test <project-name>`: tests the project's application
1921
- `yarn nx lint <project-name>`: lints the project's application
2022

21-
#### Nonspecific project commands
23+
### Nonspecific project commands
2224

2325
- `yarn create:component <name>`: creates a React component
2426
- `yarn create:hook <name>`: creates a React hook
2527
- `yarn create:function <name>`: creates a function
2628

2729
## landing-page
2830

29-
Landing Page project for [devfile.io](https://devfile.io/).
30-
31-
### Configuring navigation
32-
33-
- Header
34-
35-
Header navigation can be configured on [`navigation.ts`](https://github.com/devfile/devfile-web/blob/main/apps/landing-page/navigation.ts).
36-
37-
```ts
38-
export const headerNavigation: HeaderNavigation = [
39-
...
40-
];
41-
```
42-
43-
Each element in `headerNavigation` is as follows:
44-
45-
```ts
46-
[
47-
{
48-
name: 'Example', // the name of the link
49-
href: 'https://example.com', // the URI of the link
50-
image: ExampleIcon, // Optional: the image of the link
51-
}
52-
]
53-
```
54-
55-
- Footer
56-
57-
Footer navigation can be configured on [`navigation.ts`](https://github.com/devfile/devfile-web/blob/main/apps/landing-page/navigation.ts).
58-
59-
```ts
60-
export const footerNavigation: FooterNavigation = {
61-
contributors: [
62-
...
63-
],
64-
links: [
65-
...
66-
],
67-
social: [
68-
...
69-
],
70-
};
71-
```
72-
73-
- `contributors`: contributors the the devfile project in alphabetical order
74-
- `links`: miscellaneous links related to the devfile project
75-
- `social`: social links for the devfile project
76-
77-
Each element in `contributors`, `links`, and `social` is as follows:
78-
79-
```ts
80-
[
81-
{
82-
name: 'Example', // the name of the link
83-
href: 'https://example.com', // the URI of the link
84-
image: ExampleIcon, // Optional: the image of the link
85-
},
86-
...
87-
]
88-
```
89-
90-
- Sidebar
91-
92-
Sidebar navigation can be configured under [`./docs-navigation`](https://github.com/devfile/devfile-web/blob/main/apps/landing-page/public/docs-navigation).
93-
94-
Each file under `/docs-navigation` corresponds to a version except `no-version.yaml` which allows uniform navigation pages between all versions.
95-
96-
Whenever you update the sidebar navigation you **MUST** restart the server.
97-
98-
Each sidebar section requires a `title` and `links`. Each element in `links` requires a `title` and `href`. Currently, sidebar navigation is only supported one layer deep.
99-
100-
```yaml
101-
- title: Example section 1
102-
links:
103-
- title: Element 1
104-
href: /element1
105-
- title: Element 2
106-
href: /element2
107-
- title: Example section 2
108-
links:
109-
- title: Element 3
110-
href: /element3
111-
- title: Element 3
112-
href: /element4
113-
```
114-
115-
### Updating documentation
116-
117-
To update or add documentation, edit or create a markdown file under [`./docs`](https://github.com/devfile/devfile-web/tree/main/apps/landing-page/pages/docs). The markdown is converted to html pages automatically by the [markdoc](https://markdoc.io/) Next.js addon. Instead of using `.mdx`, markdoc extends markdown by enclosing snippets in curly brackets.
118-
119-
- [Built-in tags](https://markdoc.io/docs/tags#built-in-tags)
120-
121-
- Custom tags
122-
123-
Custom tags can be found under [`./tags.tsx`](https://github.com/devfile/devfile-web/blob/main/apps/landing-page/markdoc/tags.tsx)
124-
125-
- `fences`
126-
127-
Curly brackets after specifying the code language is optional.
128-
129-
````md
130-
```yaml {% title="Optional: Example" filename="Optional: devfile.yaml" %}
131-
schemaVersion: 2.2.0
132-
metadata:
133-
name: mydevfile
134-
components:
135-
- name: mydevfile
136-
volume:
137-
size: 200G
138-
```
139-
````
140-
141-
- `callout`
142-
143-
The children for `callout` can be any valid markdown or snippet.
144-
145-
```md
146-
{% callout title="Note!" %}
147-
- All location references to `starterProjects` will change to local
148-
paths relative to the stacks directory.
149-
150-
- Stack component image references will change to use the offline
151-
accessible image repository.
152-
{% /callout %}
153-
```
154-
155-
- `figure`
156-
157-
```md
158-
{% figure src="./example" alt="Example" caption="This is an example caption" /%}
159-
```
160-
161-
- `quick-link` and `quick-links`
162-
163-
```md
164-
{% quick-links %}
165-
166-
{% quick-link title="Installation" icon="installation" href="/" description="Step-by-step guides to setting up your system and installing the library." /%}
167-
168-
{% quick-link title="Architecture guide" icon="presets" href="/" description="Learn how the internals work and contribute." /%}
169-
170-
{% quick-link title="Plugins" icon="plugins" href="/" description="Extend the library with third-party plugins or write your own." /%}
171-
172-
{% quick-link title="API reference" icon="theming" href="/" description="Learn to easily customize and modify your app's visual design to fit your brand." /%}
173-
174-
{% /quick-links %}
175-
```
176-
177-
After you update any documentation, update the navigation if you added a new page or changed a file name.
178-
179-
### Releasing a new version
31+
[Landing Page README](https://github.com/devfile/devfile-web/tree/main/apps/landing-page)

apps/landing-page/.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
**/docs
2-
**/devfile-schemas
1+
pages/docs/**
2+
!pages/docs/index.tsx
3+
4+
public/devfile-schemas

0 commit comments

Comments
 (0)