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

Migrate to new namespace layout #6

Merged
merged 137 commits into from
Feb 8, 2021
Merged

Migrate to new namespace layout #6

merged 137 commits into from
Feb 8, 2021

Conversation

mirekdlugosz
Copy link
Collaborator

Migrating liquid-tags plugin to new namespace layout, based on instructions from drafted article on Pelican blog. Fixes #1 .

Linters don't report any errors, all tests pass and plugin is recognized by pelican-plugins after installation. I tested most tags and checked if what they actually produce seems to resemble what they should be producing, although my testing was far from exhaustive.

  • tags must be enabled explicitly in new LIQUID_TAGS configuration setting
  • I could not check Flickr and Giphy, since they require API key and I don't have account on these services
  • Instagram tag appears to be completely broken, see gram tag is no longer working #2
  • I could not get examples from blockdiag tag docstring to work, so I changed them (see 68be4f2); this is potentially backwards-incompatible
  • notebook tag lost ability to use provided template file, see [notebook] Doesn't use plugin as source of templates #3

My work starts with commit deb688f ; I did clean up history a little, but I would like to keep these commits to have a record of code changes that must have been done during porting.

@justinmayer @kdeldycke please let me know what you think

jakevdp and others added 30 commits May 2, 2013 08:36
It showed incorrect tag and the syntax was not in a code block
Closes getpelican/pelican-plugins#69

Due to change in pelican code, `import EXTENSIONS` was no longer
working.
Plugin reads files from `content/code/`, instead of
`content/downloads/code/`.
- Works as the existing [octopress / jekyll plugin](https://gist.github.com/jamieowen/2063748)
alberand and others added 24 commits October 25, 2020 15:43
It hides Download link
Lines [xxx] won't be shown if :hidetitle: is used
Seems like it wasn't tested because if file was in codec different from
'utf-8' it failed on reading
These tests check only basic functionality without any specific usecases
… CSS classes

A regression was introduced few patches ago, which placed code inside
the `figcaption` tag. This is not correct.

The original version has this layout

```
figure
  figcaption
  code
```

This patch fixes this issue. It also encloses metadata,

1. title
2. filename
3. line number

inside CSS classes. This let's themes improve the look of the
figcaption. Previously, all the metadata was piled into one `<span>`.
Adding <iframe> adds 1.2MB of javascript to webpage. And tracking
cookies.

Instead we can add thumbnail of video and link it to YouTube page. So
user can click to watch movie and is not tracked on our site.

YOUTUBE_THUMB_ONLY liquid config flag enables this mode
YOUTUBE_THUMB_SIZE allows to select one of YT thumbnails - there are
four of them defined:

- maxres: 1280x720
- sd:      640x360
- hq:      480x360
- mq:      320x180

'sd' one is used if not defined in LIQUID_CONFIGS variable.
LIQUID_TAGS is list of tags that should be made available to posts. It
is optional, but if it is not provided, no tag will be loaded, making
plugin essentially useless.
- document new LIQUID_TAGS setting
- small updates to existing documentation
@kdeldycke
Copy link
Member

Outstanding work @mirekdlugosz ! I have nothing to say but I'm impressed with you huge effort. Everything is properly documented and all missing pieces are covered by a corresponding ticket.

You made the right call overall: the little sacrifices are balanced and allows for this plugin to finally be standalone.

So LGTM, let's merge! 🎉

@kdeldycke kdeldycke merged commit e2227ad into main Feb 8, 2021
@kdeldycke kdeldycke deleted the migrate branch February 8, 2021 09:55
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

Successfully merging this pull request may close these issues.

Release pelican-liquid-tags v1.0.0 on PyPI