Git Product home page Git Product logo

website's Introduction

Flutter's website

Flutter's static website, built with Jekyll.

Build Status

Issues, bugs, and requests

We welcome contributions and feedback on our website! Please file a request in our issue tracker and we'll take a look.

Developing

Install Jekyll and related tools by following the instructions provided by GitHub.

A tldr version follows:

  1. Ensure you have Ruby installed; you need version 2.2.2 or later:
    ruby --version

  2. Ensure you have Bundler installed; if not install with:
    sudo gem install bundler

  3. Install all dependencies:
    bundle install

  4. Create a branch.

  5. Make your changes.

  6. Test your changes by serving the site locally:
    bundle exec jekyll serve (or jekyll serve -w --force_polling)

  7. Prior to submitting, run link validation:
    bundle exec jekyll build
    bundle exec htmlproofer _site --empty-alt-ignore --url-ignore "#" --only-4xx --url-swap "https?\:\/\/(localhost\:4000|flutter\.io):"

Writing for flutter.io

(Eventually, this section should be expanded to its own page.)

Highlighting code in a code block

Do you want to highlight code inside a code block? We got that! Don't confuse this with automatic syntax highlighting. You can accomplish that by adding "dart" (or the relevant language identifier) after the tick-tick-tick:

```dart
void main() {
  print('Hello World');
}
```

If you want to highlight a specific bit of code, use the [[highlight]]highlight this text[[/highlight]] syntax. For example:

{% prettify dart %} void main() { print([[highlight]]'Hello World'[[/highlight]]); } {% endprettify %}

The prettify plugin will also unindent your code.

If you want to see how this functionality was added to this site, refer to this commit.

Including a region of a file

You can include a specific range of lines from a file:

{% include includelines filename=PATH start=INT count=INT %}

PATH must be inside of _include. If you are including source code, place that code into _include/_code to follow our convention.

Adding next/previous page links

If you have a document that spans multiple pages, you can add next and previous page links to make navigating these pages easier. It involves adding some information to the front matter of each page, and including some HTML.

---
layout: tutorial
title: "Constraints"
sidebar: home_sidebar
permalink: /tutorials/layout/constraints.html
prev-page: /tutorials/layout/properties.html
prev-page-title: "Container Properties"
next-page: /tutorials/layout/create.html
next-page-title: "Create a Layout"
---

{% include prev-next-nav.html %}

{:toc}

<!-- PAGE CONTENT -->

{% include prev-next-nav.html %}

Omit the "prev-page" info for the first page, and the "next-page" info for the last page.

Code snippet validation

The code snippets in the markdown documentation are validated as part of the build process. Anything within a '```dart' code fence will be extracted into its own file and checked for analysis issues. Some ways to tweak that:

  • If a code snippet should not be analyzed, immediately proceed it with a <!-- skip --> comment
  • To include code to be analyzed, but not displayed, add that in a comment immediately proceeding the snippet (e.g., <!-- someCodeHere(); -->)
  • A snippet without any import statements will have an import ('package:flutter/material.dart') automatically added to it
  • We ignore special formatting tags like [[highlight]].

website's People

Contributors

a14n avatar abarth avatar appsforartists avatar butlermatt avatar cbracken avatar chinmaygarde avatar collinjackson avatar devoncarew avatar eseidelgoogle avatar faisalabid avatar goderbauer avatar hixie avatar inmatrix avatar ipavl avatar krisgiesing avatar kwalrath avatar larkascending avatar mdakin avatar mishadynin avatar mit-mit avatar mkustermann avatar mohamedhayibor avatar qchong avatar raju-bitter avatar sethladd avatar sfshaza2 avatar thebosz avatar tvolkert avatar vicb avatar yjbanov 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.