Skip to content

Commit

Permalink
Revert <base> tag.
Browse files Browse the repository at this point in the history
This reverts commits:
    37f2829
    465fa43
  • Loading branch information
Kwpolska committed Aug 2, 2015
1 parent 37f2829 commit d2e3b02
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 14 deletions.
1 change: 0 additions & 1 deletion CHANGES.txt
Expand Up @@ -10,7 +10,6 @@ Bugfixes
--------

* "nikola auto" serving implicit index.html with wrong mime type (Issue #1921)
* <base href> resolve common relative resource loading issues
* Handle non-integer shutter speeds and other variables in WordPress
importer (Issue #1917)

Expand Down
4 changes: 1 addition & 3 deletions nikola/data/themes/base-jinja/templates/base_helper.tmpl
Expand Up @@ -21,12 +21,10 @@ dir="rtl"
lang="{{ lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<base href="{{ abs_link(permalink) }}">

{% if description %}
<meta name="description" content="{{ description }}">
{% endif %}
<meta name="viewport" content="width=device-width">
<title>{{ title|e }} | {{ blog_title|e }}</title>

{{ html_stylesheets() }}
Expand Down
4 changes: 1 addition & 3 deletions nikola/data/themes/base/templates/base_helper.tmpl
Expand Up @@ -21,12 +21,10 @@ dir="rtl" \
lang="${lang}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<base href="{{ abs_link(permalink) }}">

%if description:
<meta name="description" content="${description}">
%endif
<meta name="viewport" content="width=device-width">
<title>${title|striphtml} | ${blog_title|striphtml}</title>

${html_stylesheets()}
Expand Down
Expand Up @@ -26,12 +26,10 @@ dir="rtl"
lang="{{ lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{ abs_link(permalink) }}">

{% if description %}
<meta name="description" content="{{ description }}">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title|e }} | {{ blog_title|e }}</title>

{{ html_stylesheets() }}
Expand Down
4 changes: 1 addition & 3 deletions nikola/data/themes/bootstrap3/templates/base_helper.tmpl
Expand Up @@ -26,12 +26,10 @@ dir="rtl" \
lang="${lang}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="${abs_link(permalink)}">

%if description:
<meta name="description" content="${description}">
%endif
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${title|striphtml} | ${blog_title|striphtml}</title>

${html_stylesheets()}
Expand Down
2 changes: 1 addition & 1 deletion nikola/nikola.py
Expand Up @@ -1017,7 +1017,7 @@ def render_template(self, template_name, output_name, context):
utils.makedirs(os.path.dirname(output_name))
parser = lxml.html.HTMLParser(remove_blank_text=True)
doc = lxml.html.document_fromstring(data, parser)
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']), resolve_base_href=False)
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']))
data = b'<!DOCTYPE html>\n' + lxml.html.tostring(doc, encoding='utf8', method='html', pretty_print=True)
with open(output_name, "wb+") as post_file:
post_file.write(data)
Expand Down

0 comments on commit d2e3b02

Please sign in to comment.