mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fix issue #91
This commit is contained in:
parent
129ce24308
commit
93e62c6336
1 changed files with 2 additions and 2 deletions
|
|
@ -232,13 +232,13 @@ class ArticlesGenerator(Generator):
|
||||||
if tags:
|
if tags:
|
||||||
max_count = max(tags)
|
max_count = max(tags)
|
||||||
steps = self.settings.get('TAG_CLOUD_STEPS')
|
steps = self.settings.get('TAG_CLOUD_STEPS')
|
||||||
|
|
||||||
# calculate word sizes
|
# calculate word sizes
|
||||||
self.tag_cloud = [
|
self.tag_cloud = [
|
||||||
(
|
(
|
||||||
tag,
|
tag,
|
||||||
int(
|
int(
|
||||||
math.floor(steps - (steps - 1) * math.log(count) / math.log(max_count))
|
math.floor(steps - (steps - 1) * math.log(count) / (math.log(max_count)or 1))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
for tag, count in tag_cloud
|
for tag, count in tag_cloud
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue