Creando su sitio
Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.
Después de instalación y preparación, gran parte del trabajo para crear un sitio básico para tus documentos ya está completo.
Estructura del sitio
Your site structure looks like the following:
root-of-repo
├── docs
└── website
│ └── blog
│ └── core
│ └── Footer.js
│ └── node_modules
│ └── package.json
│ └── pages
│ └── sidebars.json
│ └── siteConfig.js
│ └── static
This assumes that you removed the example
.md
files that were installed with the initialization script.
Todos sus archivos de documentación deben colocarse dentro de la carpeta docs
como archivos markdown .md
. Cualquier publicación de blog debe estar dentro de la carpeta blog
.
The blog posts must be formatted as
YYYY-MM-DD-your-file-name.md
Crea tu sitio básico
Para crear un sitio totalmente funcional, solo necesita hacer unos pocos pasos:
Add your documentation to the
/docs
folder as.md
files, ensuring you have the proper header in each file. The simplest header would be the following, whereid
is the link name (e.g.,docs/intro.html
) and thetitle
, is, of course, the title of the browser page.--- id: título Introducción: primeros pasos --- mi * contenido nuevo * aquí..
Add zero or more docs to the
sidebars.json
file so that your documentation is rendered in a sidebar, if you choose them to be.Si no agrega su documentación al archivo
sidebars.json
, los documentos se mostrarán, pero solo se pueden vincular desde otra documentación y se pueden visitar con la URL conocida.Modify the
website/siteConfig.js
file to [configure your site](/docs/es-ES/configuración del sitio.html), following the comments included in the [docs](/docs/es-ES/configuración del sitio.html) and thewebsite/siteConfig.js
to guide you.Create any [custom pages](/docs/es-ES/páginas Personalizadas.html#customizing-your-site-footer) and/or [customize](/docs/es-ES/páginas Personalizadas.html#customizing-your-site-footer) the
website/core/Footer.js
file that provides the footer for your site.Coloque activos, como imágenes, en la carpeta
website/static/
.Ejecute el sitio para ver los resultados de sus cambios.
cd website yarn run start # or `npm run start` # navigate to http://localhost:3000