AddressForAll / site-v2

New AddressForAll website, version 3 of attempts to make it better
Apache License 2.0
1 stars 0 forks source link

Include makefile to preprocessing and tools #15

Open ppKrauss opened 2 years ago

ppKrauss commented 2 years ago

The website-v2 is a "hub of contents" of other websites (OSM.codes and digital-guard.org), and a "sister project" of docs.addressforall.org website... So, to build all in one place and one command we need some orchestration, using simple and language-agnostic algorithms. The suggestion is the old makefile but we can use NPM.

Preprocessing

Demandas em docs.addressforall.org (ver documentation_generator, http://addressforall.org/teste2/ (publicação dos dados) e outros.

Inicialmente o make pode apenas avisar o que falta rodar, mas aos poucos podemos centralizar todos os recursos de publicação neste repositório do site.

HTML content

For example QuemSomos.js and all other pt/ConteudoSecao, can be a simple HTML. The make run a preprocessing that converts all HTML into expanded Javascript-Mustashe template:

import React from "react";
import Container from "../../../Container/Container";
import Section from "../../../Container/Section";

const {{HTML_name}} = () => (
   {{THE_HTML_HERE}}
)

export default {{HTML_name}}

So, it converts QuemSomos.html into QuemSomos.js. It can use NPM mustache.