You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`yarn nx run <project-name>:export`: exports the project's application to be static
18
20
-`yarn nx test <project-name>`: tests the project's application
19
21
-`yarn nx lint <project-name>`: lints the project's application
20
22
21
-
####Nonspecific project commands
23
+
### Nonspecific project commands
22
24
23
25
-`yarn create:component <name>`: creates a React component
24
26
-`yarn create:hook <name>`: creates a React hook
25
27
-`yarn create:function <name>`: creates a function
26
28
27
29
## landing-page
28
30
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
-
exportconst 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
-
exportconst 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.
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.
0 commit comments