Skip to content

Remove hardcoded copyright year #3616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
#

from __future__ import division, print_function, unicode_literals

import os
import sys

Expand All @@ -11,6 +13,7 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readthedocs.settings.dev")

from django.conf import settings
from django.utils import timezone

import django
django.setup()
Expand All @@ -33,7 +36,9 @@

master_doc = 'index'
project = u'Read the Docs'
copyright = u'2010-2017, Read the Docs, Inc & contributors'
copyright = '2010-{}, Read the Docs, Inc & contributors'.format(
timezone.now().year
)
version = '1.0'
release = '1.0'
exclude_patterns = ['_build']
Expand Down
6 changes: 5 additions & 1 deletion readthedocs/templates/sphinx/conf.py.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-

from __future__ import division, print_function, unicode_literals

from datetime import datetime

from recommonmark.parser import CommonMarkParser

extensions = []
Expand All @@ -10,7 +14,7 @@ source_parsers = {
}
master_doc = 'index'
project = u'{{ project.name }}'
copyright = u'2016'
copyright = str(datetime.now().year)
Copy link
Member Author

@stsewd stsewd Feb 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, should be better to generate this on template parse time (using {{ some_year }}) rather than build time?

version = '{{ version.verbose_name }}'
release = '{{ version.verbose_name }}'
exclude_patterns = ['_build']
Expand Down