webuildsg / data

:chart: Data and graphs for repos and events from We Build SG
https://data.webuild.sg
MIT License
16 stars 7 forks source link

Fix favicon link #54

Closed jsstrn closed 8 years ago

jsstrn commented 8 years ago

Fixes issue #53

I get an issue when running npm run build:html. It will replace the new favicon link with the older one.

sayanee commented 8 years ago

thanks @jsstrn Yes running npm run build:html will create the html files from jade file.

You can see the code in package.json L36:

"build:html": "gulp",

which in turn is calling the gulpfile.js to build the html files:

gulp.task('default', function () {
  gulp.src('./views/index.jade').pipe(jade(jadeOptions)).pipe(gulp.dest('./'))
  gulp.src('./views/graphs/**/*.jade').pipe(jade(jadeOptions)).pipe(gulp.dest('./dataset'))
})

You can also try npm start to run the site locally and see if all the pages have the favicon.

Else I can merge it too as it looks good :+1:

jsstrn commented 8 years ago

@sayanee so that means I should be editing the views/partials/head.jade file instead of the index.html file directly, right?

sayanee commented 8 years ago

Both @jsstrn :smile: I updated the instructions in #53

index.html is the homepage and views/partials/head.jade is the common head tag section of all the graph pages.

notthetup commented 8 years ago

So what is index.jade then?

sayanee commented 8 years ago

@notthetup yuh just explained above

sayanee commented 8 years ago

oops yes just views/partials/head.jade will do @jsstrn! Then run npm run build:html and git status to check all the favicon links are correct and you are good to go :+1:

notthetup commented 8 years ago

OK. So am I right to say.. index.jade (which pulls in head.jade) is used to create index.html when you run npm run build:html.

So one should only ever be editing the .jade files manually. The .html files should be auto generated by the build command.

sayanee commented 8 years ago

:+1: :100: yes!

Even if you touch the html files, the build process npm run build:html will over write it. So no problem at all!

jsstrn commented 8 years ago

@sayanee @notthetup thanks for clarifying. I've made the change and run the build. :+1:

sayanee commented 8 years ago

thanks @jsstrn for your contribution! You are now a collaborator on this repo 🤗 as this is an OPEN Open source project

Have fun :tada:

cheeaun commented 8 years ago

:tada: :+1:

jsstrn commented 8 years ago

Thank you! :+1: