GithubHelp home page GithubHelp logo

rumesh / preact-www Goto Github PK

View Code? Open in Web Editor NEW

This project forked from preactjs/preact-www

0.0 1.0 0.0 3.85 MB

:book: Preact documentation website.

Home Page: https://preactjs.com

JavaScript 67.68% CSS 30.18% HTML 2.14%

preact-www's Introduction

Preact Documentation Website

Build Status Preact Slack Community

Built with preact-cli

๐Ÿš€ master is automatically deployed to preactjs.com


Application Structure

This website is built as a prerendered static app, following the Application Shell pattern.

Content

Content is fetched and rendered on the fly from Markdown documents located in content/, similar to how Jekyll works. Documents can contain optional YAML FrontMatter for specifying page metadata or layout information. Once fetched, content is parsed using marked and rendered to VDOM via preact-markup.

Custom Elements

Since preact is used to render the Markdown content, HTML contained in a document reference any of the Components listed in src/components/widget.js as Custom Elements, useful for dynamic content:

## Example Page

<!-- Jumbotron and Logo are actually Preact components! -->
<jumbotron>
    <h1><logo text>Preact</logo></h1>
</jumbotron>

Navigation

Currently, the navigation menu and route handling is controlled by src/config.json. This is likely to change, but in the meantime it means any new pages must be linked from the "nav" section of the config.


Local Development

Clone & Install Dependencies

git clone https://github.com/preactjs/preact-www.git
cd preact-www

npm install

Development Workflow

To start a live-reload development server:

PORT=8080 npm run dev

Any time you make changes within the src directory, it will rebuild and even refresh your browser.

Generate a production build in ./build:

npm run build

License

MIT

preact-www's People

Contributors

38elements avatar addyosmani avatar dandv avatar danielbayerlein avatar david-zzg avatar developit avatar download avatar hassanbazzi avatar huruji avatar impronunciable avatar joaolucasl avatar jovidecroock avatar kuldeepkeshwar avatar lcxfs1991 avatar malcolmyu avatar marvinhagemeister avatar mozmorris avatar ofgo avatar paranoidjk avatar pazguille avatar pl12133 avatar reznord avatar robertknight avatar rykdesjardins avatar sapegin avatar shaedrich avatar size-plugin[bot] avatar tao1991123 avatar vitormalencar avatar yhau1989 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.