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

question(usage): basic loadcsv usage #1

Open
Kristinita opened this issue Jun 3, 2018 · 0 comments
Open

question(usage): basic loadcsv usage #1

Kristinita opened this issue Jun 3, 2018 · 0 comments

Comments

@Kristinita
Copy link

1. Summary

I can't begin to use Pelican-loadcsv.

2. Environment

  • Windows 10 Enterprise LTSB 64-bit EN,
  • Python 3.6.5,
  • Pelican 3.7.1,
  • Python Markdown 2.6.11,
  • Pelican-loadcsv 2015-03-20.

3. Configuration

See simple configuration in SashaLoadCSV branch of my demo repository:

Sasha__LoadCSV--debugging.md:

Title: Sasha__LoadCSV--debugging.md
Date: 2018-05-19 11:15:49
Modified: 2018-06-03 20:40:54

Sasha Goddess!

{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}

Part of pelicanconf.py:

PLUGINS = [
    'loadcsv'
]

4. Steps to reproduce

pelican content -s pelicanconf.py --verbose

5. Expected behavior

Generating tables from CSV in articles.

Support different tables for different articles.

6. Actual behavior

<p>{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}</p>

7. Not helped

7.1. Backticks

Try in Sasha__LoadCSV--debugging.md:

```
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
```

Result:

<div class="highlight"><pre><span></span>{% csv &#39;&#39;&#39;
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
&#39;&#39;&#39;%}
</pre></div>

7.2. Templates

If I add to base.html:

{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}

I get an error in console:

CRITICAL: TemplateSyntaxError: Encountered unknown tag 'csv'.

Else as in this answer:

{{ csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''}}

I get another error:

CRITICAL: TemplateSyntaxError: expected token 'end of print statement', got 'string'

7.3. Jinja2content

I try enable jinja2content plugin:

PLUGINS = [
    'jinja2content',
    'loadcsv'
]

No effect.

Thanks.

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

No branches or pull requests

1 participant