Plantilla de proyecto·Pro
Sitio estático en Markdown
Escribe páginas en Markdown y conviértelas en un sitio HTML estático con un mismo diseño y un menú. El build son unas 110 líneas de Node.js que puedes cambiar, y el único paquete es marked. Abre el resultado en el DevBrowser. El primer npm install necesita el entorno Linux.
Para instalarlo necesitas PocketCode Pro.
Si tienes PocketCode instalado en tu Android, esto abre la página en la app.
Vista previa
Ficheros
README.md
build.js
content/about.md
content/guide.md
content/index.md
lib/site.js
package-lock.json
package.json
static/style.css
templates/layout.html
test/site.test.jsREADME.md
# Markdown site: static pages built with Node.js Write pages in Markdown and turn them into a small static site: every file in `content/` becomes an HTML page with the same layout and a menu that links them all. `build.js` and `lib/site.js` add up to about 110 lines you can read and change, and the only package is [marked](https://marked.js.org), the Markdown parser. The output is plain HTML and CSS, with no JavaScript, so it works on any static host. Comes with tests. ## Run it in PocketCode 1. Install marked once. Open the terminal in this project's folder (Open Terminal Here, in the editor menu) and run this in the app's Linux environment with Node.js and npm (the Developer pack in Terminal › Linux); it needs internet: ```sh npm install ``` 2. Build the site: open `build.js` and tap Run, or in the terminal: ```sh npm run build ``` The output lists the pages it wrote to `site/`. 3. Open `site/index.html` in the editor and tap the DevBrowser button to see it. The menu links work between pages. After you edit a Markdown file, build again and reload the DevBrowser. In the terminal, `npm run watch` builds again on every save. ## Add a page Create a file in `content/`, for example `content/projects.md`: ```markdown --- title: Projects order: 3 --- # Projects What I am working on. See the [about page](about.md). ```Esta vista previa está recortada. El contenido completo llega al instalarlo.
Cambios en la 1.0.0
Primera versión.