Skip to content
This repository was archived by the owner on Feb 10, 2020. It is now read-only.

Commit b43d12f

Browse files
authored
Merge branch 'master' into arduino-install-tutorial
2 parents 9fc714d + 1846ae8 commit b43d12f

File tree

195 files changed

+12155
-1958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+12155
-1958
lines changed

.circleci/config.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
docker:
5+
- image: canonicalwebteam/dev
6+
7+
jobs:
8+
test-site:
9+
<<: *defaults
10+
steps:
11+
- checkout
12+
- run:
13+
name: Install dependencies
14+
command: yarn
15+
- run:
16+
name: Install bower dependencies
17+
command: bower --allow-root install
18+
- run:
19+
name: Build the site resources
20+
command: yarn run build-all
21+
- run:
22+
name: Run the site server
23+
command: PORT=80 ./bin/serve
24+
background: true
25+
- run:
26+
name: Check site is accessible
27+
command: sleep 4 && curl --head --fail --retry-delay 5 --retry 10 --retry-connrefused http://localhost
28+
lint-content:
29+
<<: *defaults
30+
steps:
31+
- checkout
32+
- run:
33+
name: Install dependencies
34+
command: yarn
35+
- run:
36+
name: Lint content
37+
command: yarn lint-content
38+
lint-style:
39+
<<: *defaults
40+
steps:
41+
- checkout
42+
- run:
43+
name: Install dependencies
44+
command: yarn
45+
- run:
46+
name: Lint style
47+
command: yarn lint-style
48+
lint-js:
49+
<<: *defaults
50+
steps:
51+
- checkout
52+
- run:
53+
name: Install dependencies
54+
command: yarn
55+
- run:
56+
name: Lint JS
57+
command: yarn lint-js
58+
lint-polymer:
59+
<<: *defaults
60+
steps:
61+
- checkout
62+
- run:
63+
name: Install yarn dependencies
64+
command: yarn
65+
- run:
66+
name: Install bower dependencies
67+
command: bower --allow-root install
68+
- run:
69+
name: Lint polymer
70+
command: yarn lint-polymer
71+
72+
workflows:
73+
version: 2
74+
build:
75+
jobs:
76+
- test-site
77+
- lint-content
78+
- lint-style
79+
- lint-js
80+
- lint-polymer

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Done
2+
3+
[List of work items including drive-bys]
4+
5+
## QA
6+
7+
- Check out this feature branch
8+
- Run the site using the command `./run serve`
9+
- View the site locally in your web browser at: [http://0.0.0.0:8016/](http://0.0.0.0:8016/)
10+
- [List additional steps to QA the new features or prove the bug has been resolved]
11+
12+
13+
## Issue / Card
14+
15+
[List of links to Github issues/bugs and cards if needed - e.g. `Fixes #1`]
16+
17+
## Screenshots
18+
19+
[if relevant, include a screenshot]

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# [generated] Bracketed sections updated by Yeoman generator
2-
# generator-canonical-webteam@2.1.1
2+
# generator-canonical-webteam@3.2.1
33

44
# [os] OS & editor files
55
Desktop.ini
@@ -41,6 +41,7 @@ package-lock.json
4141
/parts/
4242
/prime/
4343
/stage/
44+
*.egg-info
4445
.snapcraft/
4546
*.snap
4647
_site/
@@ -50,6 +51,7 @@ _site/
5051
.docker-project
5152
.*.hash
5253
.envrc
54+
.env.local
5355
env/
5456
env[23]/
5557

.stylelintrc

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,120 @@
1-
extends:
2-
- 'stylelint-config-polymer'
31
processors:
42
- 'stylelint-processor-html'
53
rules:
4+
'at-rule-empty-line-before':
5+
- always
6+
-
7+
except:
8+
- blockless-after-same-name-blockless
9+
- first-nested
10+
-
11+
ignore:
12+
- after-comment
13+
'at-rule-name-case': lower
14+
'at-rule-name-space-after': always-single-line
15+
'at-rule-semicolon-newline-after': always
16+
'block-closing-brace-empty-line-before': never
17+
'block-closing-brace-space-before': always-single-line
18+
'block-no-empty': true
19+
'block-opening-brace-newline-after': always-multi-line
20+
'block-opening-brace-space-after': always-single-line
21+
'block-opening-brace-space-before': always
22+
'color-hex-case': lower
23+
'color-hex-length': short
24+
'color-no-invalid-hex': true
25+
'comment-empty-line-before':
26+
- always
27+
-
28+
except:
29+
- first-nested
30+
-
31+
ignore:
32+
- stylelint-commands
33+
'comment-no-empty': true
34+
'comment-whitespace-inside': always
35+
'custom-property-empty-line-before':
36+
- always
37+
-
38+
except:
39+
- after-custom-property
40+
- first-nested
41+
-
42+
ignore:
43+
- after-comment
44+
- inside-single-line-block
45+
'declaration-bang-space-after': never
46+
'declaration-bang-space-before': always
47+
'declaration-block-no-shorthand-property-overrides': true
48+
'declaration-block-semicolon-newline-after': always-multi-line
49+
'declaration-block-semicolon-space-after': always-single-line
50+
'declaration-block-semicolon-space-before': never
51+
'declaration-block-single-line-max-declarations': 1
52+
'declaration-block-trailing-semicolon': always
53+
'declaration-colon-newline-after': always-multi-line
54+
'declaration-colon-space-after': always-single-line
55+
'declaration-colon-space-before': never
56+
'function-calc-no-unspaced-operator': true
57+
'function-comma-newline-after': always-multi-line
58+
'function-comma-space-after': always-single-line
59+
'function-comma-space-before': never
60+
'function-linear-gradient-no-nonstandard-direction': true
61+
'function-max-empty-lines': 0
62+
'function-name-case': lower
63+
'function-parentheses-newline-inside': always-multi-line
64+
'function-parentheses-space-inside': never-single-line
65+
'indentation': 2
66+
'keyframe-declaration-no-important': true
67+
'length-zero-no-unit': true
68+
'max-empty-lines': 1
69+
'media-feature-colon-space-after': always
70+
'media-feature-colon-space-before': never
71+
'media-feature-name-case': lower
72+
'media-feature-parentheses-space-inside': never
73+
'media-feature-range-operator-space-after': always
74+
'media-feature-range-operator-space-before': always
75+
'media-query-list-comma-newline-after': always-multi-line
76+
'media-query-list-comma-space-after': always-single-line
77+
'media-query-list-comma-space-before': never
78+
'no-eol-whitespace': true
79+
'no-extra-semicolons': true
80+
'no-invalid-double-slash-comments': true
81+
'no-missing-end-of-source-newline': true
82+
'number-leading-zero': always
83+
'number-no-trailing-zeros': true
84+
'property-case': lower
85+
'selector-attribute-brackets-space-inside': never
86+
'selector-attribute-operator-space-after': never
87+
'selector-attribute-operator-space-before': never
88+
'selector-combinator-space-after': always
89+
'selector-combinator-space-before': always
90+
'selector-list-comma-newline-after': always
91+
'selector-list-comma-space-before': never
92+
'selector-max-empty-lines': 0
93+
'selector-pseudo-class-case': lower
94+
'selector-pseudo-class-no-unknown':
95+
- true
96+
- ignorePseudoClasses:
97+
- host
98+
'selector-pseudo-class-parentheses-space-inside': never
99+
'selector-pseudo-element-case': lower
100+
'selector-pseudo-element-colon-notation': double
101+
'selector-pseudo-element-no-unknown':
102+
- true
103+
- ignorePseudoElements:
104+
- 'content'
105+
- 'shadow'
106+
'selector-type-case': lower
107+
'selector-type-no-unknown':
108+
- true
109+
- ignoreTypes:
110+
- /^[a-zA-Z]([a-zA-Z0-9]*-[a-zA-Z0-9]+)+/
111+
'shorthand-property-no-redundant-values': true
112+
'string-no-newline': true
113+
'unit-case': lower
114+
'unit-no-unknown': true
115+
'value-list-comma-newline-after': always-multi-line
116+
'value-list-comma-space-after': always-single-line
117+
'value-list-comma-space-before': never
6118
'block-closing-brace-newline-after': null
7119
'block-closing-brace-newline-before': null
8120
'function-url-quotes': always

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,65 @@
1-
# Contributing
1+
# How to contribute
22

3-
Issues, content and code contributions are all very appreciated. We ask that you read the relevant sections of this document before contributing.
3+
Issues, tutorials requests, new tutorials, content fixes and code contributions are all very much appreciated. We ask that you read the relevant sections of this document before contributing.
44

5+
## Contributing a content fix
56

6-
## Issues
7+
Have you spotted a typo? A screenshot that needs updating? A nonsensical sentence? While we strive to foster and maintain quality content, mistakes happen. If you have the time, please open a new Pull Request, propose a fix and add the "Tutorials Content" label to it, it will be reviewed quickly.
78

8-
When creating issues, please add as much information as you can and try to split it up into readable sections.
9+
## Contributing a new tutorial
910

10-
Some example sections to include:
11-
- Short summary
12-
- Steps taken to produce the issue
13-
- Current and expected result
14-
- A screenshot to demonstrate the issue
15-
16-
17-
## Pull requests
18-
19-
Please try to create simple commits with readable commit messages. Do split the work into smaller pull requests, rather than one big pull request, unless you are proposing a new tutorial.
20-
21-
Some sections to include when creating a PR:
22-
- Short summary of the work completed
23-
- Steps to view and test visual or code changes
24-
- Links to any relevant issues
25-
- Screenshots to demonstrate the work
11+
See our [writing guide](https://tutorials.ubuntu.com/?q=tutorial+guidelines) for extensive documentation on writing and publishing a new tutorial. It contains step-by-step documentation, content guidelines and examples to help you make the best of this platform.
2612

13+
All tutorials are reviewed and merged by the Canonical Docs team in order to maintain content consistency. You can get in touch with us on Freenode IRC, in [#ubuntu-doc](http://webchat.freenode.net/?channels=ubuntu-doc).
2714

28-
## Tutorial content
15+
### New tutorial FAQ
2916

30-
We support Markdown as a source for our tutorials.
17+
#### What's the format of a tutorial?
3118

32-
### Markdown
19+
Each tutorial is a single Markdown file, placed inside the `tutorials` folder of this repository.
3320

34-
_If you find any bugs in Markdown rendering, please report them to [Ubuntu tutorial deployment repository](https://github.com/ubuntu/tutorial-deployment)_
21+
#### Where are images hosted?
3522

36-
Our [Ubuntu tutorial guidelines](examples/example-tutorial.md) markdown tutorial is inside the `examples` folder. This contains useful information and resources for creating new tutorials, including documentation on custom markdown tags used in this project. You can view this tutorial in full by running the local server and can use the source as a template to create new content.
23+
Images can be placed inside this repository, alongside a tutorial in an `images` folder.
3724

38-
The markdown is rendered by [Google's claat markdown parser](https://github.com/googlecodelabs/tools/tree/master/claat/parser/md). More information can be found on their github page.
25+
Note that some tutorials use `assets.ubuntu.com` for image hosting: it's an access-controlled file hosting service used by the Canonical Web team to host images for Ubuntu related websites. If you open a pull request containing images, there is a chance that your reviewer will upload your images there in order to control the size of the repository.
3926

40-
#### Where should I save the file?
41-
42-
The build tool allows files to be saved in a single folder. We have best practices in our repository to maintain consistency.
27+
#### Where should I save a new tutorial?
4328

4429
Please save new markdown files in a folder inside `./tutorials/<category>/`, and save images in an `images` subfolder.
30+
4531
```
4632
.
4733
└── tutorials
48-
└── new-tutorial-name
49-
├── images
50-
└── example-image.png
51-
└── new-tutorial-name.md
34+
└── <category>
35+
└── new-tutorial-name
36+
├── images
37+
└── image-01.png
38+
└── new-tutorial-name.md
5239
```
5340

54-
We are working on adding external repository support for Canonical maintained repositories.
41+
#### A Markdown paragraph is not rendering correctly, why?
42+
43+
The Markdown is rendered by [Google's claat markdown parser](https://github.com/googlecodelabs/tools/tree/master/claat/parser/md), with some custom additions documented in [the writing guide](https://tutorials.ubuntu.com/tutorial/tutorial-guidelines#6).
44+
45+
Most Markdown features are supported, however, if you find any bugs in the rendering, please report them in the [Ubuntu tutorial deployment repository](https://github.com/ubuntu/tutorial-deployment).
46+
47+
## Opening a pull request
48+
49+
Please try to create simple commits with readable commit messages. When possible, split the work into smaller pull requests, rather than one big pull request, unless you are proposing a new tutorial.
50+
51+
Some sections to include when creating a PR:
52+
- Short summary of the work completed
53+
- Steps to view and test visual or code changes
54+
- Links to any relevant issues
55+
- If applicable, screenshots to demonstrate the work. Note that in most cases, a reviewer will launch an online demo of your PR so that other reviewers and yourself can quickly see how it renders on the site.
56+
57+
## Opening an issue
58+
59+
When opening issues, please add as much information as you can and try to split it up into readable sections.
60+
61+
Some sections to include:
62+
- Short summary
63+
- Steps taken to produce the issue
64+
- Current and expected result
65+
- If applicable, a screenshot to demonstrate the issue

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ WORKDIR /srv
2525
ADD . .
2626

2727
# Setup commands to run server
28-
ENTRYPOINT ["yarn", "run", "prpl-server"]
28+
ENTRYPOINT ["yarn", "run", "start-server"]
2929
CMD [""]

0 commit comments

Comments
 (0)