# Documentation
## Structure of the Documentation
When writing documentation, it is important to know the audience you are writing for and what kind of document you are writing. We try to follow the framework listed below, but there are always some exceptions since the documentation is always changing. This framework is valuable to keep in mind, but we also follow the principle that if a PR is better than the existing content on the site, we'll merge it in and follow up to make it better later if it doesn't perfectly match the standards.
### Types of Documents
We are generally following the [Diataxis](https://diataxis.fr) model where documents are divided into tutorials, concept guides, recipes and reference.
- Tutorial - Focused on explaining a concept through step by step instructions.
- Concept guide - Explains why something works the way it does or how to think about something.
- Recipe - Focused directions to accomplish a specific task. Describes how to do something.
- Reference - Lists what you can do with the tool (i.e. API docs).
### Audiences
We also have different audiences in mind when writing docs:
ð¶ New user starting from scratch
- They know their framework of choice
- They have probably heard the term monorepo but don't really know what it is
- They're smart and eager to learn
ð¶ New user migrating an existing repo
- They know their framework of choice
- They know how npm workspaces work
- They're smart and eager to learn
ð¦ Intermediate User
- They know how to create an Nx repo or add Nx to an existing repo
- They have heard the terms integrated and package-based
- They know what a project is and how to make one
- They understand how to run a task and the basics of caching
- They can launch the graph
- They know that it is possible to enforce project boundaries
ð¨â𦳠Advanced User
- They know everything about Nx except the specific piece of knowledge that is being taught by this document.
### Outline
- Getting Started - These documents assume a new user and are generally concept guides with a lot of links to other parts of the site. There are some elements of recipes mixed in, but those should be kept to a minimum.
- Tutorials - These are tutorials written for a new user. After completing one of these tutorials, the user should have enough knowledge to be an intermediate user.
- Core Features - These are primarily recipes with a little concept mixed in. These documents should be short and provide the basic information that people will want 80% of the time and link to anything more complex. A new user should be able to click through these documents and skim them to get a good understanding of what Nx does without getting overwhelmed with details.
- Concepts - These are concept guides written for a new user. Any recipe content should be split into a recipe document and linked.
- More Concepts (or other categories under Concepts) - These are concept guides written for an intermediate user.
- Recipes - These are recipes written for an advanced user.
- Nx with Your Favorite Tech - These are tutorials written for an intermediate user.
- Benchmarks - Reference documents linking to external resources.
- Reference - Reference documents.
## Markdown syntax available
The default markdown syntax is supported when writing documentation.
### Front matter
Front matter is used to add metadata to your Markdown file (`title` & `description`). It is provided at the very top of the file, enclosed by three dashes `---`. The content is parsed as `YAML`.
If no Front matter is detected, the metadata will be populated with the following:
- `title`: first main title detected
- `description`: first paragraph detected
```markdown
---
title: This is a custom title
description: This is a custom description
---
```
### Social Media Images
You can specify a custom social media image for a page by specifying `mediaImage` in the `map.json` entry for that page. `mediaImage` is a path relative to `/docs`.
Note that you won't see the social media image in the preview generated for your PR, because it loads from the live `nx.dev` site. You can make sure the image is correct by looking at `[preview-url]/images/open-graph/[page-url].[image-extension]`.
### Custom markdown syntax
The documentation website [nx.dev](https://nx.dev) is using custom Markdown syntax to enable the authors to add functionality to its content.
#### Callouts
Callouts are available to get the attention of the reader on some specific type of information.
```markdown
{% callout type="caution|check|note|warning" title="string" %}
Your content goes here.
{% /callout %}
```
#### Disclosure
A disclosure can be used for less important information that is initially collapsed.
```markdown
{% disclosure title="string" %}
Your content goes here.
{% /disclosure %}
```
#### Cards
Cards allow showing content in a grid system with a title, a description, a type and an url (internal/external).
```markdown
{% cards %}
{% card title="string" description="string" type="documentation|external|video" url="string" /%}
{% card title="string" description="string" type="documentation|external|video" url="string" /%}
// as many as cards you want
{% /cards %}
```
Title cards allow to only show a title in a card with a title and an url.
```markdown
{% cards cols="4" %}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% /cards %}
```
#### Code
You can add specific languages and a filename on the code snippet displayed.
````
â```javascript {% fileName="main.js" %}
â const code = "goes here";
â```
````
#### Line Highlighting
You can define groups of lines that can be interactively highlighted to illustrate a point.
````
â```javascript {% lineGroups={ first:[2,3],second:[4,5] } %}
â const code = "goes here";
â This is in the first group
â This is also in the first group
â This is in the second group
â This is also in the second group
â```
````
The line groups can be highlighted using a button on the code fence itself, or by clicking on a link that you provide that changes the url fragment.
For example:
```
[This will highlight the first group.](#first)
```
You can also statically highlight a set of lines (the user won't be able to change what is highlighted):
````
â```javascript {% highlightLines=[2,3] %}
â const code = "goes here";
â This is highlighted
â This is also highlighted
â This is not highlighted
â Neither is this
â```
````
You can also specify ranges like `highlightLines=[2,3,"8-10"]`.
#### Terminal command
To display a terminal command, use:
````
â```shell
â npx nx build
â```
````
#### Terminal Output
You can display your terminal output with a dedicated component the same way you would show code.
````
â``` {% command="node index.js" %}
â My terminal output here!
â```
````
You can optionally also pass a `path` like
````
â``` {% command="node index.js" path="~/myorg" %}
â My terminal output here!
â```
````
#### Terminal Video Output
You can have a more dynamic visualization of a terminal output by using the following component:
```
{% terminal-video src="/documentation/shared/images/caching/cache-terminal-animation.mp4" /%}
```
#### Custom iframes
We can display a special iframe and setting its width inside the document.
```markdown
{% iframe
src="https://staging.nx.app/orgs/62d013d4d26f260059f7765e/workspaces/62d013ea0852fe0a2df74438?hideHeader=true"
title="Nx Cloud dashboard"
width="100%" /%}
```
If the type of the card is set to `type="video"` the `url` is a valid YouTube url, then the card will show a thumbnail of the video.
#### GitHub repositories
We can display a special button inviting the reader to go to a GitHub repository.
```markdown
{% github-repository url="https://github.com/nrwl/nx-examples" /%}
```
#### Stackblitz Buttons
You can add an
没有合适的资源?快使用搜索试试~ 我知道了~
下一代系统构建工具:一个强大的开源构建系统,它提供了用于提高开发人员生产力、优化CI性能和维护代码质量的工具和技术
共2000个文件
json:1218个
md:702个
js:39个
需积分: 1 0 下载量 176 浏览量
2024-03-18
10:02:55
上传
评论
收藏 50.2MB ZIP 举报
温馨提示
一个强大的开源构建系统,它提供了用于提高开发人员生产力、优化CI性能和维护代码质量的工具和技术。
资源推荐
资源详情
资源评论
收起资源包目录
下一代系统构建工具:一个强大的开源构建系统,它提供了用于提高开发人员生产力、优化CI性能和维护代码质量的工具和技术 (2000个子文件)
algolia-search.global.css 13KB
main.css 4KB
syntax-highlight.css 1KB
syntax-highlight.css 1KB
styles.css 806B
tailwind-imports.css 59B
tailwind.css 59B
tailwind-imports.css 59B
tailwind-imports.css 59B
tailwind-imports.css 59B
tailwind-imports.css 59B
tailwind.css 59B
AppDelegate.h 98B
index.html 985B
preview-head.html 636B
preview-head.html 636B
index.html 351B
downloads.html 6B
environment.js 76KB
redirect-rules.js 48KB
index.js 8KB
redirect-rules.spec.js 3KB
tailwind.config.js 2KB
next.config.js 1KB
tailwind.config.js 986B
tailwind.config.js 986B
tailwind.config.js 986B
tailwind.config.js 986B
tailwind.config.js 908B
tailwind.config.js 908B
tailwind.config.js 908B
environment.js 793B
preview.js 762B
index.js 693B
webpack.config.js 569B
environment.js 509B
jest.preset.js 486B
jest.preset.js 480B
environment.js 408B
environment.js 401B
main.js 308B
copy-docs.js 296B
next-sitemap.config.js 290B
main.js 268B
main.js 268B
main.js 268B
postcss.config.js 201B
postcss.config.js 177B
postcss.config.js 177B
postcss.config.js 175B
postcss.config.js 175B
postcss.config.js 146B
postcss.config.js 141B
postcss.config.js 139B
preview.js 86B
preview.js 64B
preview.js 33B
large-tasks.json 1.43MB
package-lock.json 1.14MB
package-lock.json 869KB
menus.json 338KB
e2e.json 320KB
e2e-affected.json 320KB
nx.json 244KB
nx-examples-task-inputs.json 190KB
package-lock.json 173KB
affected.json 159KB
nx-api.json 151KB
package-lock-v2.pruned.json 151KB
package-lock-v2.json 151KB
package-lock-v1.json 142KB
packages-metadata.json 136KB
package-lock.json 107KB
map.json 96KB
package-lock.json 96KB
package-lock.json 67KB
e2e.json 60KB
nx-examples-project-graph.json 60KB
e2e-affected.json 60KB
affected.json 60KB
ci.json 58KB
migrations.json 52KB
e2e.json 51KB
e2e-affected.json 51KB
various-projects.json 49KB
tags.json 40KB
application.json 30KB
various-configs.json 29KB
migrations.json 29KB
webpack-browser.json 27KB
various-projects.json 26KB
browser-esbuild.json 25KB
npm-workspaces-build-tasks1.json 24KB
all-projects.json 24KB
schema.json 23KB
nx-schema.json 22KB
webpack.json 21KB
schema.json 19KB
schema.json 19KB
migrations.json 19KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
UnknownToKnown
- 粉丝: 1w+
- 资源: 583
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于图像的三维模型重建C++源代码+文档说明(高分课程设计)
- 基于聚焦法的工件立体测量方案,根据数据进行三维重建 使用HALCON处理图像,MATLAB拟合数据+源代码+数据集+效果图
- 锄战三国村 修改:货币使用不减 v1.10(2) 原创 (中文).apk
- 基于python实现的单目双目视觉三维重建+源代码+图像图片(高分课程设计)
- 基于C+++OPENCV的全景图像拼接源码(课程设计)
- 基于Python+OpenCV对多张图片进行全景图像拼接,消除鬼影,消除裂缝+源代码+文档说明+界面截图(高分课程设计)
- 基于C++实现的全景图像拼接源码(课程设计)
- 基于SIFT特征点提取和RASIC算法实现全景图像拼接python源码+文档说明+界面截图+详细注释(95分以上课程大作业)
- 基于matlab实现眼部判别的疲劳检测系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的异常姿势识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功