Modelo de projeto·Pro
Site estático em Markdown
Escreva páginas em Markdown e gere um site HTML estático com um layout único e um menu. O build tem cerca de 110 linhas de Node.js que você pode mudar, e o único pacote é o marked. Abra o resultado no DevBrowser. O primeiro npm install precisa do ambiente Linux.
Para instalar, você precisa do PocketCode Pro.
Se o PocketCode estiver instalado no seu Android, isto abre a página no app.
Prévia
Arquivos
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 prévia está encurtada. O conteúdo completo vem com a instalação.
Mudanças na 1.0.0
Primeira versão.