Skip to content

Commit

Permalink
inclusao sitemap working
Browse files Browse the repository at this point in the history
  • Loading branch information
guipsamora committed Mar 18, 2018
1 parent 9a687cc commit 1a8ce40
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
1 change: 0 additions & 1 deletion client/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import sucesso from './sucesso/sucesso.component';
import transparencia from './transparencia/transparencia.component';
import util from '../components/util/util.module';


import 'angular-socket-io';
import './app.scss';

Expand Down
4 changes: 1 addition & 3 deletions client/app/transparencia/transparencia.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ export class TransparenciaController {
plans = [ ];
learnings = [ ];
transf = [ ];




/*@ngInject*/
constructor($http, $scope, socket, $routeParams, $window) {
this.$http = $http;
Expand Down
32 changes: 20 additions & 12 deletions client/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->

<url>
<loc>http://www.doebem.org.br/</loc>
<lastmod>2017-04-07T10:21:09+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.doebem.org.br</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./sobre</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/href</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./pagOngs/saudecrianca</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./pagOngs/renovatio</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./pagOngs/caviver</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./givewell</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/transparencia</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/metodologia</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/duvidas</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/./#contato</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/#ongs</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/renovatio</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/saudecrianca</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/caviver</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/Temporariamente</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/amf</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/givedirectly</loc><priority>0.5</priority></url>
<url><loc>http://www.doebem.org.br/pagOngs/schistosomiasis</loc><priority>0.5</priority></url>
</urlset>
3 changes: 2 additions & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ gulp.task('revReplaceWebpack', () => gulp.src('dist/client/app.*.js')
gulp.task('copy:extras', () => gulp.src([
`${clientPath}/favicon.ico`,
`${clientPath}/robots.txt`,
`${clientPath}/.htaccess`
`${clientPath}/.htaccess`,
`${clientPath}/sitemap.xml`
], {
dot: true
})
Expand Down
11 changes: 11 additions & 0 deletions server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import errors from './components/errors';
import path from 'path';

const clientPath = 'client';

export default app => {
// Insert routes below
app.use('/api/things', require('./api/thing'));
Expand All @@ -31,4 +33,13 @@ export default app => {
.get((req, res) => {
res.sendFile(path.resolve(`${app.get('appPath')}/index.html`));
});

// Sitemap route
// app.state('sitemap.xml', {url: '/sitemap.xml'});

// Sitemap route II
app.route('/sitemap.xml')
.get((req, res) => {
res.sendFile(path.resolve(`${app.get(clientPath)}/sitemap.xml`));
});
};

0 comments on commit 1a8ce40

Please sign in to comment.