Commit Graph

23 Commits

Author SHA1 Message Date
Dan McGee
0cac18ea4f Add link to release listing page from public index
We didn't link this page from anywhere so it was hard to find. Also add
it to the sitemap so it gets indexed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-06-20 14:09:11 -05:00
Dan McGee
1457f78594 Package sitemap adjustments
Adjust changefreq and priority based on the repository the package is
in. Testing and staging have quick turnover so set the changefreq to
'daily'. Additionally, give staging packages a super low priority of 0.1
and testing a slightly lowered priority of 0.4.

We didn't include staging packages before, but since search engines are
finding them anyway, we might as well. This gives us a chance to share
how important the page is as well, which they could only guess before.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-20 18:58:35 -06:00
Dan McGee
445c242dac Add a releases model sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:12:46 -06:00
Dan McGee
7313a7914d Include 'files_last_update' in package sitemap query
We need this for the package files sitemap; else we are doing one query
per package to retrieve this field. Whoops.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18 20:15:40 -06:00
Dan McGee
ec2ab9ba35 Add mirror status page to base sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12 15:51:42 -06:00
Dan McGee
9b373c43af Optimize packages sitemap generation
* Select arch and repo related models as we need the name off each
* Only select the fields we actually need from the database
* Exclude [staging] packages

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30 01:51:49 -05:00
Dan McGee
33bfba7104 Defer content and other text items when building news sitemap
We can get away with not retrieving these larger pieces of data when
building the news sitemap.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-20 09:31:27 -05:00
Dan McGee
a87864f6d0 Slight adjustments to sitemaps priority values
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04 19:44:55 -05:00
Dan McGee
aed00836d5 Skip default ordering in sitemaps output
The output is not required to be ordered by the specification, so save
some effort by skipping any sorting.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-02 12:06:48 -05:00
Dan McGee
90e08b4863 Make all datetime objects fully timezone aware
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
250fa087c9 Use varying changefreq in news sitemap
For those items less than one day old, mark change frequency as 'daily';
for those less than one week old, mark as 'weekly'. Finally, bump
everything else up from 'never' to 'yearly' to ensure it gets crawled at
least once in a while.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-16 09:14:15 -05:00
Dan McGee
4590196d79 Integrate master key into rest of site
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 14:07:35 -06:00
Dan McGee
a883b0af23 Add a split packages sitemap
With very low priority, but this should at least give a few more
cross-linking pages to any crawlers using sitemaps.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-11 11:57:04 -06:00
Dan McGee
cda9c5bb34 Add a base pages sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 16:55:03 -05:00
Dan McGee
b0bad20756 Use correct date in news sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 16:12:01 -05:00
Dan McGee
4a9b6867a3 Refactor common select_related into manager method
For a Package object query, we almost always did .select_related('arch',
'repo). Refactor this into the manager as a 'normal()' method so we can
avoid sprinkling the same logic everywhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15 15:50:14 -05:00
Dan McGee
f637a1eb67 Move news model to an appropriate place
Never would have guessed it should actually be in news/models.py.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08 00:23:55 -05:00
Dan McGee
2750b94345 Move package utility functions
We now have a few of them, so move them to their own file like we do in the
other applications.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28 10:53:27 -05:00
Dan McGee
e595665abd Add a package groups sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27 17:25:46 -05:00
Dan McGee
5f9d98d407 Sitemaps: split and index, add package files
Split it up as it is growing rather large, and add all the package files
views to the mix so Google or anyone can pick those up. They get a slightly
lower priority (if that even matters).

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-10 00:17:51 -06:00
Dan McGee
d709604102 Remove archweb prefix from all imports
Unnecessary, and lets us standardize on not using it everywhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10 00:29:27 -06:00
Dan McGee
f22f20003b Make sitemap generation suck a lot less
Add a select_related() clause that was really needed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-02 21:38:53 -06:00
Ismael Carnales
c1a197d29a added sitemaps from archweb_pub 2009-11-09 22:24:45 -02:00