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
* Migrate from bower to npm
This change migrates from the use of bower (deprecated) to npm for dependencies.
We also update Bootstrap to 4.3
Several packages do not exist in NPM so they are copied into the static directory for the theme
Signed-off-by: Matt Stratton <[email protected]>
* Add gulp for build
* Create gulp task for building scss and js
Signed-off-by: Matt Stratton <[email protected]>
* Update with docs on gulp task
Copy file name to clipboardexpand all lines: themes/devopsdays-theme/CONTRIBUTING.md
+24-35
Original file line number
Diff line number
Diff line change
@@ -31,21 +31,13 @@ The technical details on how to set up your local development environment for ma
31
31
32
32
## Dev Setup
33
33
34
-
Working with a Hugo theme outside of a content-based repo has a few challenges. The `devopsdays-theme` repo contains a directory called `exampleSite`, which is what is used for testing theme development. The `config.toml` for the `exampleSite` contains the following value:
34
+
One of the more important things to know is that if you are going to make changes to CSS or JavaScript, you will need to be able to run the scripts that compile the SCSS files to CSS, and also concatenate and minifiy the JavaScript we use. In order to do this, you need the following installed on your local machine:
35
35
36
-
```
37
-
themesdir = "../.."
38
-
```
39
-
40
-
This tells Hugo where to look for its theme directories.
41
-
42
-
You will need to run your watch command from the `exampleSite` directory; use something like this:
43
-
44
-
```
45
-
hugo server -w --baseUrl="http://localhost:1313"
46
-
```
36
+
-[node](https://nodejs.org/en/)
37
+
-[npm](https://www.npmjs.com/get-npm)
38
+
-[gulp](https://gulpjs.com/)
47
39
48
-
NOTE: If you also load the existing `devopsdays-web`project, it is highly suggested that you use the `-p` flag on `hugo server` to load this theme on a different port. This will prevent your browser from caching assets like stylesheets, etc, from the other instance.
40
+
Once you have these install, navigate to the root of `devopsdays-web`in a terminal, and run `npm install` to get all the pieces installed into `devopsdays-web`. The `node_modules` directory is not committed to source control, so you will have to run `npm install` any time you are setting up a new copy of the repo on a workstation.
49
41
50
42
## How can I help?
51
43
@@ -55,7 +47,7 @@ Sort the existing GitHub issues for the tag of `ready`. These are issues that ca
55
47
56
48
### Frameworks
57
49
58
-
We use [Boostrap v4 Alpha](http://v4-alpha.getbootstrap.com/) as our basic framework.
50
+
We use [Boostrap v4.3](https://getbootstrap.com/docs/4.3/getting-started/introduction/) as our basic framework.
59
51
60
52
### Blocks
61
53
All page templates should make use of the `layouts/_default/baseof.html` file. This file contains all wrappers for the content. Anything within the `{{- block "main" . }} {{- end -}}` section is what will be displayed on a sub-template. Include a `{{ define "main" }}` block in your template to include what should be rendered.
@@ -81,28 +73,29 @@ The `devopsdays-theme` repo has hooks into Travis, Appveyor, and Netlify. Curren
81
73
All changes are built by Netlify to https://dev.devopsdays.org once merged to master.
82
74
83
75
### Asset Pipeline
84
-
Peruse the `gulpfile.js` to see what is processed for the asset pipeline. Gulp is only called when changes are merged to master. Pull requests, and local changes will not trigger gulp.
85
-
86
-
If you are manipulating JavaScript or SCSS files, please be sure to use Gulp. If you run `gulp dev` inside the repo, it will build the CSS and JS files, and also start a `watch` task for you.
76
+
If you make changes to SCSS files, or the `themes/devopsdays-theme/static/js/devopsdays.js` file, you will need to run a `gulp` task to compile the SCSS to CSS and to concatenate and minify the Javascript files.
87
77
88
-
If you need help with this, ask @mattstratton.
89
-
90
-
## Workflow
78
+
To run this, navigate to the root of `devopsdays-web` in your terminal, and run `gulp dev`. If you get errors, you likely don't have `node`, `npm`, and/or `gulp` installed. You also may not have run `npm install`.
91
79
92
-
Our workflow is inspired by [Ian Bickering's guide to using GitHub Issues](http://www.ianbicking.org/blog/2014/03/use-github-issues-to-organize-a-project.html).
80
+
The output of `gulp dev` should look something like this:
93
81
94
-
### Milestones
95
-
96
-
**Stuff we are doing right now:** this is the “main” milestone. We give it a minor SemVer name (like 1.2 or 2.3). We create a new milestone when we have released a new minor version.
97
-
98
-
**Stuff we’ll probably do soon:** this is the standing [“Next Tasks” milestone](https://github.com/devopsdays/devopsdays-theme/milestone/4). We never change or rename this milestone.
99
-
100
-
**Stuff we probably won’t do soon:** this is the standing [“Blue Sky” milestone](https://github.com/devopsdays/devopsdays-theme/milestone/3). We refer to these tickets and sometimes look through them, but they are easy to ignore, somewhat intentionally ignored.
101
-
102
-
**What aren’t we sure about?:** issues with no milestone.
82
+
```
83
+
[12:31:47] Using gulpfile ~/src/github.com/devopsdays/devopsdays-web/gulpfile.js
84
+
[12:31:47] Starting 'dev'...
85
+
[12:31:47] Starting 'js-concat'...
86
+
[12:31:50] Finished 'js-concat' after 3.51 s
87
+
[12:31:50] Starting 'sass'...
88
+
[12:31:51] Finished 'sass' after 652 ms
89
+
[12:31:51] Finished 'dev' after 4.16 s
90
+
```
103
91
104
-
There should be no other milestones; issues that are logged as `bug` or `enhancement` will be prioritized into the milestone when we are ready to work on them. Only issues with the tag of `ready` should be worked on.
92
+
After running, you should see updates to the following files in `themes/devopsdays-theme/static`:
93
+
-`css/site.css`
94
+
-`css/site.css.map`
95
+
-`js/devopsdays-min.js`
96
+
-`js/devopsdays-min.js.map`
105
97
98
+
## Workflow
106
99
107
100
### Issues
108
101
@@ -134,7 +127,3 @@ These are the labels we use, and what they mean:
134
127
### Pull Requests
135
128
136
129
Please submit your proposed changes as a Pull Request against this repository. If the PR will resolve an issue, please add `Fixes #123` to the PR.
137
-
138
-
## Releasing
139
-
140
-
See [utils/README](https://github.com/devopsdays/devopsdays-theme/blob/master/utils/README.md) for instructions.
0 commit comments