Skip to content

Commit

Permalink
[dash] Use clean URLs w/o trailing slashes (flutter#1225)
Browse files Browse the repository at this point in the history
* [dash] firebase config: use clean URLs w/o trailing slashes

Fixes flutter#1126

* Remove hard coded permalinks

* Cleanup site-local hrefs, removing trailing slashes

* More link cleanup, including fixing invalid anchors

* Firebase redirect rule cleanup

* Disable HTMLProofer, will soon replace by linkcheck

* Jekyll layouts: page -> default, and make default the default

* Use default layout, by default

* Cleanup page titles

* A few more image path adjustments
  • Loading branch information
chalin authored Sep 4, 2018
1 parent a2b2672 commit b35ed36
Show file tree
Hide file tree
Showing 154 changed files with 1,141 additions and 1,527 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ env:
- TZ=US/Pacific # normalize build timestamp
matrix:
- TASK="./tool/check-examples.sh"
- TASK="rake build_and_checklinks"
# SKIP link checking until we can get linkcheck running
# - TASK="rake build_and_checklinks"

before_install:
- rvm install 2.4.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ to the front matter of each page, and including some HTML.
```
---
layout: tutorial
title: "Constraints"
title: Constraints
permalink: /tutorials/layout/constraints.html
prev-page: /tutorials/layout/properties.html
Expand Down
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ branch: dash # TODO: reset to master

pub: https://pub.dartlang.org

defaults:
- scope:
path: ''
values:
layout: default

# Build settings
source: src

Expand Down
134 changes: 24 additions & 110 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,118 +1,32 @@
{
"hosting": {
"public": "_site",
"cleanUrls": true,
"trailingSlash": false,
"rules": "firebase_config/firebase_rules.json",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"ignore": [ "assets/.sprockets-manifest-*.json" ],
"redirects": [
{
"source": "/style-guide*",
"destination": "https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo",
"type": 301
},
{
"source": "/tutorial/",
"destination": "/widgets-intro/",
"type": 301
},
{
"source": "/basic-widgets/",
"destination": "/widgets/",
"type": 301
},
{
"source": "/material-design-catalog/",
"destination": "/widgets/",
"type": 301
},
{
"source": "/chat",
"destination": "https://gitter.im/flutter/flutter",
"type": 302
},
{
"source": "/issues",
"destination": "https://github.com/flutter/flutter/issues",
"type": 302
},
{
"source": "/platform-services*",
"destination": "/using-packages/",
"type": 301
},
{
"source": "/platform-plugins*",
"destination": "/using-packages/",
"type": 301
},
{
"source": "/intellij-setup/",
"destination": "/ide-setup/",
"type": 301
},
{
"source": "/intellij-ide/",
"destination": "/using-ide/",
"type": 301
},
{
"source": "/app/appcastwin.json",
"destination": "http://flutterapp.com",
"type": 301
},
{
"source": "/privacy",
"destination": "https://www.google.com/intl/en/policies/privacy/",
"type": 301
},
{
"source": "/getting-started",
"destination": "/get-started/",
"type": 301
},
{
"source": "/setup",
"destination": "/get-started/install/",
"type": 301
},
{
"source": "/ide-setup",
"destination": "/get-started/editor/",
"type": 301
},
{
"source": "/catalog/samples/tabbed-app-bar/",
"destination": "/cookbook/design/tabs/",
"type": 301
},
{
"source": "/reading-writing-files/",
"destination": "/cookbook/persistence/reading-writing-files/",
"type": 301
},
{
"source": "/custom-fonts/",
"destination": "/cookbook/design/fonts/",
"type": 301
},
{
"source": "/routing-and-navigation/",
"destination": "/cookbook/navigation/navigation-basics/",
"type": 301
},
{
"source": "/networking/",
"destination": "/cookbook/networking/fetch-data/",
"type": 301
},
{
"source": "/text-input/",
"destination": "/cookbook/forms/text-input/",
"type": 301
}
{ "source": "/style-guide*", "destination": "https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo", "type": 301 },
{ "source": "/tutorial", "destination": "/widgets-intro", "type": 301 },
{ "source": "/basic-widgets", "destination": "/widgets", "type": 301 },
{ "source": "/material-design-catalog", "destination": "/widgets", "type": 301 },
{ "source": "/chat", "destination": "https://gitter.im/flutter/flutter", "type": 302 },
{ "source": "/issues", "destination": "https://github.com/flutter/flutter/issues", "type": 302 },
{ "source": "/platform-services*", "destination": "/using-packages", "type": 301 },
{ "source": "/platform-plugins*", "destination": "/using-packages", "type": 301 },
{ "source": "/intellij-setup", "destination": "/ide-setup", "type": 301 },
{ "source": "/intellij-ide", "destination": "/using-ide", "type": 301 },
{ "source": "/app/appcastwin.json", "destination": "http://flutterapp.com", "type": 301 },
{ "source": "/privacy", "destination": "https://www.google.com/intl/en/policies/privacy", "type": 301 },
{ "source": "/getting-started", "destination": "/get-started", "type": 301 },
{ "source": "/setup", "destination": "/get-started/install", "type": 301 },
{ "source": "/ide-setup", "destination": "/get-started/editor", "type": 301 },
{ "source": "/catalog/samples/tabbed-app-bar", "destination": "/cookbook/design/tabs", "type": 301 },
{ "source": "/reading-writing-files", "destination": "/cookbook/persistence/reading-writing-files", "type": 301 },
{ "source": "/custom-fonts", "destination": "/cookbook/design/fonts", "type": 301 },
{ "source": "/routing-and-navigation", "destination": "/cookbook/navigation/navigation-basics", "type": 301 },
{ "source": "/networking", "destination": "/cookbook/networking/fetch-data", "type": 301 },
{ "source": "/text-input", "destination": "/cookbook/forms/text-input", "type": 301 }
]
}
}
2 changes: 0 additions & 2 deletions src/404.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
layout: page
title: Page not found
permalink: /404.html
---

## 404: Something's gone wrong :-(
Expand Down
4 changes: 2 additions & 2 deletions src/_includes/catalogpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h3>{{comp.name}}</h3>
<p class="scrollable-description"> {{comp.description}} </p>
<p>
<a href="{{comp.link}}">Documentation</a>
{% if comp.sample %}, <a href="/catalog/samples/{{comp.sample}}/">Samples</a>{% endif %}
{% if comp.sample %}, <a href="/catalog/samples/{{comp.sample}}">Samples</a>{% endif %}
</p>
<div class="clear"></div>
</div>
Expand All @@ -51,7 +51,7 @@ <h3>{{comp.name}}</h3>
<p class="scrollable-description"> {{comp.description}} </p>
<p>
<a href="{{comp.link}}">Documentation</a>
{% if comp.sample %}, <a href="/catalog/samples/{{comp.sample}}/">Samples</a>{% endif %}
{% if comp.sample %}, <a href="/catalog/samples/{{comp.sample}}">Samples</a>{% endif %}
</p>
<div class="clear"></div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/_includes/main-nav.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% comment %} All main nav items excluding the Flutter brand item. {% endcomment -%}

<a class="{{include.class}}" href="/docs/">Docs</a>
<a class="{{include.class}}" href="/showcase/">Showcase</a>
<a class="{{include.class}}" href="/docs">Docs</a>
<a class="{{include.class}}" href="/showcase">Showcase</a>
<a class="{{include.class}}" href="{{site.repo.flutter}}">GitHub</a>
<a class="{{include.class}}" href="{{site.pub}}/flutter">Packages</a>
<a class="{{include.class}}" href="/support/">Support</a>
<a class="{{include.class}}" href="/support">Support</a>
<form action="/search/" class="{{include.class}} form-inline" id="cse-search-box">
<input type="hidden" name="cx" value="007067728241810524621:gm6vraqlc8c">
<input type="hidden" name="ie" value="UTF-8">
Expand Down
6 changes: 3 additions & 3 deletions src/_includes/setup/path-mac-linux.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
### Update your path

You can update your PATH variable for the current session only at the command line,
as shown in [Get the Flutter SDK](./#get-sdk). You'll probably want to
as shown in [Get the Flutter SDK](#get-sdk). You'll probably want to
update this variable permanently, so you can run `flutter` commands in any terminal session.

The steps for modifying this variable permanently for all terminal sessions are machine-specific.
Typically you add a line to a file that is executed whenever you open
Typically you add a line to a file that is executed whenever you open
a new window. For example:

1. Determine the directory where you placed the Flutter SDK. You will
Expand All @@ -19,7 +19,7 @@ a new window. For example:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
{% endcommandline %}

4. Run `source $HOME/.bash_profile` to refresh the current window.
4. Run `source $HOME/.bash_profile` to refresh the current window.

5. Verify that the `flutter/bin` directory is now in your PATH by running:

Expand Down
72 changes: 36 additions & 36 deletions src/_includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@
<li class="sidebar-title">Get started</li>

<ul class="sidebar-items">
<li><a href="/get-started/install/">1: Install</a></li>
<li><a href="/get-started/editor/">2: Configure editor</a></li>
<li><a href="/get-started/test-drive/">3: Test drive</a></li>
<li><a href="/get-started/codelab/">4: Write your first app</a></li>
<li><a href="/get-started/learn-more/">5: Learn more</a></li>
<li><a href="/get-started/install">1: Install</a></li>
<li><a href="/get-started/editor">2: Configure editor</a></li>
<li><a href="/get-started/test-drive">3: Test drive</a></li>
<li><a href="/get-started/codelab">4: Write your first app</a></li>
<li><a href="/get-started/learn-more">5: Learn more</a></li>
</ul>

<li class="sidebar-title">Build UIs</li>

<ul class="sidebar-items">
<li><a href="/widgets-intro/">Tour the framework</a></li>
<li><a href="/widgets/">Widget catalog</a></li>
<li><a href="/cookbook/">Cookbook</a></li>
<li><a href="/catalog/samples/">Sample catalog</a></li>
<li><a href="/widgets-intro">Tour the framework</a></li>
<li><a href="/widgets">Widget catalog</a></li>
<li><a href="/cookbook">Cookbook</a></li>
<li><a href="/catalog/samples">Sample catalog</a></li>
<li><a href="/codelabs">Codelabs</a></li>
<li><a href="/tutorials/layout/">Build layouts - Tutorial</a></li>
<li><a href="/tutorials/interactive/">Add interactivity - Tutorial</a></li>
<li><a href="/web-analogs/">Flutter for Web devs</a></li>
<li><a href="/flutter-for-android/">Flutter for Android devs</a></li>
<li><a href="/flutter-for-ios/">Flutter for iOS devs</a></li>
<li><a href="/flutter-for-react-native/">Flutter for React Native devs</a></li>
<li><a href="/flutter-for-xamarin-forms/">Flutter for Xamarin.Forms devs</a></li>
<li><a href="/gestures/">Gestures</a></li>
<li><a href="/animations/">Animations</a></li>
<li><a href="/layout/">Box constraints</a></li>
<li><a href="/assets-and-images/">Assets and images</a></li>
<li><a href="/tutorials/layout">Build layouts - Tutorial</a></li>
<li><a href="/tutorials/interactive">Add interactivity - Tutorial</a></li>
<li><a href="/web-analogs">Flutter for Web devs</a></li>
<li><a href="/flutter-for-android">Flutter for Android devs</a></li>
<li><a href="/flutter-for-ios">Flutter for iOS devs</a></li>
<li><a href="/flutter-for-react-native">Flutter for React Native devs</a></li>
<li><a href="/flutter-for-xamarin-forms">Flutter for Xamarin.Forms devs</a></li>
<li><a href="/gestures">Gestures</a></li>
<li><a href="/animations">Animations</a></li>
<li><a href="/layout">Box constraints</a></li>
<li><a href="/assets-and-images">Assets and images</a></li>
<li><a href="/tutorials/internationalization">Internationalization</a></li>
<li><a href="/accessibility">Accessibility</a></li>
</ul>

<li class="sidebar-title">Use device and SDK APIs</li>

<ul class="sidebar-items">
<li><a href="/using-packages/">Using packages</a></li>
<li><a href="/developing-packages/">Developing packages</a></li>
<li><a href="/platform-channels/">Platform-specific code</a></li>
<li><a href="/json/">JSON and serialization</a></li>
<li><a href="/using-packages">Using packages</a></li>
<li><a href="/developing-packages">Developing packages</a></li>
<li><a href="/platform-channels">Platform-specific code</a></li>
<li><a href="/json">JSON and serialization</a></li>
{% comment %}
<!-- Temporarily removed because the codelab is broken and possibly
about to be replaced by a completely new one. -->
Expand All @@ -50,23 +50,23 @@
<li class="sidebar-title">Development and tools</li>

<ul class="sidebar-items">
<li><a href="/using-ide/">Using Flutter IDEs</a></li>
<li><a href="/hot-reload/">Using hot reload</a></li>
<li><a href="/testing/">Test your app</a></li>
<li><a href="/debugging/">Debug your app</a></li>
<li><a href="/ui-performance/">Performance Profiling</a></li>
<li><a href="/inspector/">Inspect your UI</a></li>
<li><a href="/android-release/">Build and release for Android</a></li>
<li><a href="/ios-release/">Build and release for iOS</a></li>
<li><a href="/fastlane-cd/">Continuous deployment with Fastlane</a></li>
<li><a href="/upgrading/">Upgrade your Flutter install</a></li>
<li><a href="/formatting/">Format your source code</a></li>
<li><a href="/using-ide">Using Flutter IDEs</a></li>
<li><a href="/hot-reload">Using hot reload</a></li>
<li><a href="/testing">Test your app</a></li>
<li><a href="/debugging">Debug your app</a></li>
<li><a href="/ui-performance">Performance Profiling</a></li>
<li><a href="/inspector">Inspect your UI</a></li>
<li><a href="/android-release">Build and release for Android</a></li>
<li><a href="/ios-release">Build and release for iOS</a></li>
<li><a href="/fastlane-cd">Continuous deployment with Fastlane</a></li>
<li><a href="/upgrading">Upgrade your Flutter install</a></li>
<li><a href="/formatting">Format your source code</a></li>
</ul>

<li class="sidebar-title">More details</li>

<ul class="sidebar-items">
<li><a href="/faq/">FAQ</a></li>
<li><a href="/faq">FAQ</a></li>
<li><a href="/technical-overview">Technical overview</a></li>
<li><a href="https://docs.google.com/presentation/d/1B3p0kP6NV_XMOimRV09Ms75ymIjU5gr6GGIX74Om_DE/edit?usp=sharing">Magic of Flutter slides</a></li>
<li><a href="https://docs.google.com/presentation/d/1cw7A4HbvM_Abv320rVgPVGiUP2msVs7tfGbkgdrTy0I/edit?usp=sharing">Architecture diagrams</a></li>
Expand Down
Loading

0 comments on commit b35ed36

Please sign in to comment.