Skip to content
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

A strange behavior of code blocks #112

Closed
seisman opened this issue Feb 17, 2014 · 3 comments
Closed

A strange behavior of code blocks #112

seisman opened this issue Feb 17, 2014 · 3 comments

Comments

@seisman
Copy link

seisman commented Feb 17, 2014

Below is a rST file for test:

This is a test
##############

:date: 2014-02-17
:slug: this-is-a-test

Heading 
=======

Text here!

.. code-block:: bash

    $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc

A strange behavior happens at left top corner of the HTML.
1

And I found elements like below from HTML source file which cause this:

<meta name="description" content="Heading Text here! 1$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc" />

On the other hand, it looks good if I use theme notmyidea, and it is also good if I remove the double quotes in code-block.

@talha131
Copy link
Member

@seisman Elegant places article's summary in <meta name="description"> for SEO. In your case, article summary is auto generated which is

Heading Text here! $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc

The quoted part "$HOME/.pyenv"' is messing up the output.

One way to resolve this issue is to define your own :summary: meta data. Alternatively you can put more text in "Text Here!" part to make sure Pelican does not use code block in article.summary.

@seisman seisman closed this as completed Feb 18, 2014
@seisman
Copy link
Author

seisman commented Feb 18, 2014

Yes, it works. Thanks for your kind reply.

@talha131
Copy link
Member

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants