You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Please title your pull request in this format: The event name and year in the title of the PR, along with a description of what is being changed, i.e., `[CHI-2017] Add Bluth Company as a sponsor`*
1
+
*Please title your pull request in this format: The event name and year in the title of the PR, along with a description of what is being changed, i.e., `[CHI-2019] Add Bluth Company as a sponsor`*
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+84-25
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
# Contributing to devopsdays-web
2
2
3
-
This document contains the technical details on how to set up [Hugo](https://gohugo.io/) (to see your edits locally before pushing them to GitHub), and how to prepare a Pull Request for inclusion on the [devopsdays](http://www.devopsdays.org/) website.
3
+
This document contains the technical details on how to set up [Hugo](https://gohugo.io/) (to see your edits locally before pushing them to GitHub), and how to prepare a pull request to make changes to content on the [devopsdays](https://www.devopsdays.org/) website.
4
4
5
-
If you'd like to assist in contributing to the code of the website, please see [devopsdays/devopsdays-theme](https://github.com/devopsdays/devopsdays-theme).
5
+
If you'd like to assist in contributing to the code itself (as opposed to the content) of the website, please see the [devopsdays-theme CONTRIBUTING guidelines](https://github.com/devopsdays/devopsdays-web/blob/master/themes/devopsdays-theme/CONTRIBUTING.md).
6
6
7
7
## Setup
8
8
9
9
If you'd like to edit a specific devopsdays event site (and/or contribute code), here's how to get started:
1. Install [Hugo](http://gohugo.io). The current Hugo version we're using can be found in the [.circleci/config.yml](https://github.com/devopsdays/devopsdays-web/blob/master/.circleci/config.yml) file. [(Quick Install)](https://gohugo.io/getting-started/installing#binary-cross-platform)
14
+
1.[Fork](https://help.github.com/articles/fork-a-repo/) this repo and clone a copy locally.
15
15
16
16
### View site locally
17
17
@@ -25,8 +25,7 @@ Now open `http://localhost:1313` in a browser and navigate to the content that y
25
25
26
26
## Pull requests
27
27
28
-
### Process
29
-
28
+
### Setting your fork up the first time
30
29
31
30
Make your own [fork](https://help.github.com/articles/fork-a-repo/) of the `devopsdays-web` repository.
Before starting any new change, it is essential that you `rebase` your local repository from the upstream. Issue these commands:
42
+
You only need to create your fork once, as long as you don't delete it.
43
+
44
+
45
+
### Editing your site
46
+
47
+
1. Before starting any new change, it is essential that you `rebase` your local repository from the upstream. You may think that working from your fork is enough, but sometimes upstream changes will affect your work in ways you may not anticipate, so you'll want to stay current. Issue these commands:
44
48
45
49
46
50
-`git checkout master`
47
51
-`git pull upstream master --rebase`
48
52
49
53
50
-
This confirms you are on the master branch locally, and then applies the changes from the upstream to your copy.
51
-
54
+
This confirms you are on the master branch locally, and then applies the changes from the upstream to your copy.
52
55
53
-
Create a new local [branch](https://help.github.com/articles/about-branches/) for your changes. This helps to keep things tidy!
56
+
57
+
2. Create a new local [branch](https://help.github.com/articles/about-branches/) for your changes. This helps to keep things tidy!
54
58
55
59
```
56
60
$ git checkout -b fix_that_thing
57
61
```
58
62
(Replace `fix_that_thing` with a quick description of your *actual* change.)
59
63
60
64
61
-
Make your changes, test them locally (see above), then push that branch up to `origin` on your fork.
65
+
3.Make your changes, test them locally (see above), then push that branch up to `origin` on your fork.
62
66
63
67
```
64
68
$ git push origin fix_that_thing
65
69
```
66
70
67
-
6. Submit a [Pull Request](https://help.github.com/articles/using-pull-requests/) for the branch you just pushed. Please title the pull request according to the event affected, i.e., `[CHI-2017] Add Bluth Company as a sponsor`
68
-
7. Take a break - you've earned it!
69
-
8. When a commit is merged to `master` on GitHub (ideally via a PR reviewed by at least one other person), `Netlify` (a build tool) will automatically build the site and publish it to [http://www.devopsdays.org](http://www.devopsdays.org).
71
+
4. Submit a [Pull Request](https://help.github.com/articles/using-pull-requests/) for the branch you just pushed. Please title the pull request according to the event affected, i.e., `[CHI-2017] Add Bluth Company as a sponsor`
72
+
5. Optionally, open your [pull request](https://github.com/devopsdays/devopsdays-web/pulls) in a browser and look at the preview that `Netlify` (a build tool) built.
73
+
6. You can mention on devopsdays Slack's #website if you'd like a PR merged quickly. (Availability of maintainers varies.)
74
+
7. When a commit is merged to `master` on GitHub, Netlify will automatically build the site and publish it to [https://www.devopsdays.org](https://www.devopsdays.org).
70
75
71
76
### Guidelines
72
77
73
-
1. Code changes that affect the overall site will be merged only in the [devopsdays-theme](https://github.com/devopsdays/devopsdays-theme) repo. Theme changes should be made there, and when released, will be used in this repo.
74
-
1. We use [github issues](https://github.com/devopsdays/devopsdays-theme/issues) to track work, so feel free to create new issues if you like (or read/comment on existing ones).
75
-
1. If you are proposing a change that affects the overall site, and is not tied to an existing issue, please open a [new issue](https://github.com/devopsdays/devopsdays-theme/issues) so that it can be discussed by the team, prior to submitting a pull request.
78
+
1. Code changes for [devopsdays-theme](https://github.com/devopsdays/devopsdays-web/blob/master/themes/devopsdays-theme/) should be made in a different PR from event content updates.
79
+
1. We use [github issues](https://github.com/devopsdays/devopsdays-web/issues) to track work, so feel free to create new issues if you like (or read/comment/work on existing ones).
80
+
1. If you are proposing a change that affects the overall site, and is not tied to an existing issue, please open a [new issue](https://github.com/devopsdays/devopsdays-web/issues) so that it can be discussed by the team, prior to submitting a pull request.
81
+
1. If you're using CRLF line terminators (like on Windows), the site won't build correctly if the first `+++` line of frontmatter in speaker and program files ends in a space like `+++ `. The [workaround](https://github.com/devopsdays/devopsdays-theme/issues/652) is to remove the trailing space.
82
+
83
+
### How Changes are Merged
84
+
- A maintainer will merge the PR if it is mergable, as soon as the checks pass.
85
+
- If you do not want your PR merged immediately, in most cases you should not open the PR.
86
+
- Our [workflow guide](https://github.com/devopsdays/devopsdays-web/blob/master/utilities/docs/workflow/README.md) provides solutions to most `WIP` use cases without opening a PR.
87
+
- Questions about specific cases not covered in the guide can be asked in the #website channel on devopsdays Slack.
88
+
89
+
### Acceptable changes
76
90
77
-
### Only make changes to event content files
78
-
"Content" means anything inside the `/content/...`, `/data/...`, or `/static/...` directories.
91
+
- In general, only make changes to event content files. "Event content" means anything inside the `/content/...`, `/data/...`, or `/static/...` directories.
92
+
- Changes to event-specific content should be submitted in a separate PR from changes to more general content for the whole site.
79
93
80
-
Changes to event-specific content should be submitted in a separate PR from changes to more general content for the whole site.
94
+
### Minimal large files
95
+
96
+
Generally speaking, you should avoid storing any files other than logos or small images inside the repo itself (out of consideration for your fellow devopsdays organizers who have to pull down this repo). Please follow these guidelines:
97
+
98
+
* Do not upload presentations or other artifacts from your event into this repo. Either link to the presentation on Speakerdeck/Slideshare from the presenter, or even better, create a Speakerdeck account for your event and put the presos there.
99
+
* Small web images are fine (logos, etc). If you have high-resolution versions of your logo to share with others, please do not host them on the devopsdays-web repo.
100
+
* It is acceptable to add in a single PDF for your sponsor prospectus if you desire (in `static/events/YYYY-city`), but please keep this file under 3 MB. It is better to host it on Google Drive or something similar, and then link to it from your site.
101
+
* OPTIONAL - you can host your PDFs for prospectus, etc, in the repo at [devopsdays/devopsdays-assets](https://github.com/devopsdays/devopsdays-assets) and then link to them from there. Files in that repo are presented under their relative URL at https://assets.devopsdays.org. For example, the file located at `static/events/2016/chicago/devopsdays-chicago-2016-prospectus.pdf` in the `devopsdays/devopsdays-assets` repo will be presented at `https://assets.devopsdays.org/events/2016/chicago/devopsdays-chicago-2016-prospectus.pdf`
81
102
82
103
83
104
## Maintainer Guidelines
84
105
85
106
If you have permissions to merge PRs on this repo, here are a few guidelines to consider:
86
107
87
108
1. Is the requestor authorized to make changes for that event? They need to appear on the contact list for the year and city they're editing.
88
-
1. Do not allow any PRs that change files outside of the above-mentioned "content" directories. Especially watch out for `.gitignore`, `config.toml`, `config-windows.toml`, and anything in the `themes` directory. Our bot will notify maintainers for any changes to non-content files and assign the PR's to the maintainers, so that should help.
109
+
1. Do not allow any PRs that change files outside of the above-mentioned "content" directories. Especially watch out for `.gitignore`, `config.toml`, `config-windows.toml`, and anything in the `themes` directory. Our bot will notify maintainers for any changes to non-event-content files and assign the PRs to the maintainers, so that should help.
89
110
1. Check to see if the tests pass, but use your judgement on merging something that fails (see "PR Tests" below for guidance)
90
111
1. If you are unsure about merging a PR, please use the "request a review" button on the PR to request one from other maintainers.
91
112
1. If you're reviewing all the details of a PR before merging or are communicating with the *Submitter*, add yourself to *Assignees* so that others know someone is waiting on a response or reviewing all the details of the PR thoroughly. Be sure to also add a comment into the PR that you are reviewing it, and if you need a change from the *Submitter* prior to merge, be sure to label the PR as `do-not-merge`.
@@ -94,10 +115,48 @@ If you have permissions to merge PRs on this repo, here are a few guidelines to
94
115
95
116
The following tests run when a PR is submitted:
96
117
97
-
1.[Travis](https://travis-ci.org/devopsdays/devopsdays-web/) - this is a basic test that confirms that the site can be built with Hugo on linux, and it runs an `html-min` gulp task which will identify if there is any invalid HTML in the site. This protects the final build, so if the Travis tests fail, please take a look as to why they failed.
98
-
1.[Appveyor](https://ci.appveyor.com/project/DevOpsDays/devopsdays-web) - this again is a small test that builds Hugo on Windows, to ensure that no Windows-incompatible files have been included. If Appveyor tests fail, merge at your own discretion, based upon the failure reason.
99
-
1.[Gitmagic](https://gitmagic.io/) - This is a bot that makes sure our pull requests are fashioned cleanly. See [contributing.json](https://github.com/devopsdays/devopsdays-web/blob/master/contributing.json) for a list of rules that we enforce.
100
-
1.[Netlify](https://app.netlify.com/sites/devopsdays-web) - This is a very useful test. It builds the site, and hosts an ephemeral preview version of it (viewable by clicking on the "details" link next to the test once it has turned green). It's pretty important to view this "deploy preview" if the PR has changed anything significant (adding a sponsor, etc, probably not...but changing content in a large way? Yes.)
118
+
1.[CircleCI](https://circleci.com/gh/devopsdays/devopsdays-web) - this test confirms that the site can be built with Hugo on linux, and it runs an `html-min` gulp task which will identify if there is any invalid HTML in the site. This protects the final build, so if the CircleCI build or test jobs fail, please take a look as to why they failed.
119
+
1.[Appveyor](https://ci.appveyor.com/project/DevOpsDays/devopsdays-web) - this test builds Hugo on Windows, to ensure that no Windows-incompatible files have been included. If Appveyor tests fail, merge at your own discretion, based upon the failure reason.
120
+
1.[Netlify](https://app.netlify.com/sites/devopsdays-web) - this test builds the site, and hosts an ephemeral preview version of it (viewable by clicking on the "details" link next to the test once it has turned green). It's a good idea to view this "deploy preview" if the PR has changed anything significant (adding a sponsor, etc, probably not...but changing content in a large way? Yes.)
121
+
122
+
## Local Previews
123
+
124
+
### Sharing local changes with Netlify Dev
125
+
126
+
If you wish to show someone else your local changes without creating a pull request or committing you could utilize netlify dev.
127
+
128
+
Firstly make sure `netlify dev` is installed
129
+
130
+
```
131
+
npm install netlify-cli -g
132
+
```
133
+
134
+
If you're not authenticated with netlify, do so with the following command. Note that you may need an account.
135
+
136
+
```
137
+
netlify login
138
+
```
139
+
140
+
Now use `netlify dev` to share your local changes
141
+
142
+
```
143
+
netlify dev --live
144
+
```
145
+
146
+
You'll then be given a URL to share:
147
+
148
+
```console
149
+
Waiting for localhost:1313.
150
+
Connected!
151
+
◈ Installing Live Tunnel Client
152
+
◈ Creating Live Tunnel for 33459a04-9379-473d-8517-a25a208ef36a
0 commit comments