Commit Graph

125 Commits

Author SHA1 Message Date
759697ade3 Merge pull request #123 from Vincent-Maladiere/add_foldable_titles
Feature: activate toggle on foldable titles
2022-12-05 10:28:10 +00:00
1dea4534de shameless self promo on README :) 2022-12-04 19:17:34 +01:00
51fd922ba1 Add foldable titles 2022-12-04 19:01:40 +01:00
b444ceeadf Merge branch '2m-fix/whitespace-2m' 2022-04-03 18:18:20 +01:00
766b05edda Fixed poetry.lock conflicts 2022-04-03 18:18:03 +01:00
820ad5e436 Merge pull request #101 from 2m/fix/padding-2m
Remove gallery header padding
2022-04-03 18:00:10 +01:00
3df2bdefdb Merge pull request #102 from 2m/fix/extension-2m
Configurable extension in links
2022-04-03 17:59:29 +01:00
093df46b2e Merge pull request #99 from 2m/fix/content-load-2m
More reliable content loading
2022-04-03 17:56:23 +01:00
e7912427df Merge pull request #97 from 2m/fix/inject-url-2m
Support for injecting url
2022-04-03 17:55:28 +01:00
ab3ec1a491 Merge pull request #96 from 2m/fix/inner-html-2m
Add inner_html tag attribute (rebase)
2022-04-03 17:54:28 +01:00
9c82c7583f Merge pull request #95 from 2m/fix/docker-registry-2m
Build and push to ghcr
2022-04-03 17:53:25 +01:00
0ea67a70c0 Merge pull request #94 from 2m/fix/exit-code-2m
Non-zero exit code on error
2022-04-03 17:52:45 +01:00
c9c71a18db Gallery header padding fix 2022-04-01 09:01:23 +03:00
8ec0d23a3b Configurable extenion in links 2022-03-31 17:24:52 +03:00
4b4c7158d1 Change to html5lib parser
This parser keeps the whitespace characters in `span` elements which
fixes code block rendering.
2022-03-29 22:09:16 +03:00
f415e71586 More reliable content loading
Increases the height of the headless browser to 20000 pixels so no
scrolling is needed for all content to load.

This fixes a problem when some content in the middle of the screen would
not be loaded.

Also adds additional signal for the page load check that looks for any
changes in the page source. This fixes a situation where
`notion-scroller` already has some children but not all content
has been loaded yet.
2022-03-29 20:12:58 +03:00
a86d402e7b Support for injecting url
URL's are downloaded and cached using the usual means.

Adds a dependency to pytest and and couple of tests to validate the
injecting functionality.
2022-03-19 17:11:01 +02:00
5c9ff6a7ea Add inner_html tag attribute
Allows providing tag contant in the site configuration file.

This is a rebase of #60 on top of the latest master.
2022-03-19 14:13:41 +02:00
64358ff2e5 Build and push to ghcr
Adds a GitHub Actions job that builds and pushes docker image to GitHub
Container Registry.

Image tags and labels are managed by the default strategy of
https://github.com/docker/metadata-action#basic action.

Also browser and driver versions are updated to the latest.
2022-03-19 13:50:41 +02:00
b4bc861e16 Non-zero exit code on error
This changes all critical errors to raise exceptions. This allows to
have a single critical error handler that sets exit code to non-zero.

This way loconotion can be better used in automation jobs, where
loconotion failure should stop subsequent tasks.
2022-03-19 13:32:33 +02:00
46c77076ab Merge pull request #92 from flipio-ru/refactor
Refactor for readability, unit testing and community contibutions
2022-03-06 09:02:26 +00:00
11c066d6f1 Fix handling the index URL 2022-02-18 17:18:29 +03:00
0c326e6d16 Fix file locations so that both tests and CLI work 2022-02-18 14:57:04 +03:00
8a2c230f90 Fix tests: replace parse_subpages with `single-page 2022-02-18 14:16:30 +03:00
55c978fd7b Add CONTRIBUTING.md 2022-02-18 14:09:50 +03:00
1e3e4654f3 Add a sample unit test 2022-02-18 13:46:09 +03:00
ffc96882ed Apply black formatter 2022-02-18 13:04:55 +03:00
c8a9dcbcd7 Reorganize imports 2022-02-18 13:04:54 +03:00
45632b8265 Do not run Parser on init and split main into subfunctions
Running `Parser` from init makes unit testing impossible.

Splitting `main` into subfunctions makes it more readable.
2022-02-18 13:04:54 +03:00
be1981b813 Clean up and reorganize imports 2022-02-18 12:40:14 +03:00
9b8ca4d771 Split parse_page into several methods and some minor refactorings
Makes `parse_page` more readable
2022-02-18 12:40:14 +03:00
727121201d Move inject_custom_tags out of parse_page
Makes `parse_page` more readable
2022-02-18 11:23:43 +03:00
a298edb060 Move open_toggle_blocks out of parse_page
Makes `parse_page` more readable
2022-02-18 11:15:06 +03:00
e4bb04dbf6 Make processed_pages an attribute of Parser
This removes the dangerous practice of passing
function results through a mutable argument.
2022-02-18 11:05:09 +03:00
91dea4a5d8 Merge pull request #85 from flipio-ru/leshchenko1979/issue83
Bad rendering on ios and android
2021-12-12 11:05:54 +00:00
eac62db203 Bad rendering on ios and android
Fixes #83
2021-11-29 12:52:19 +03:00
8b1f241226 Merge pull request #82 from sathesh95/patch-1
Update README.md
2021-09-30 08:25:53 +01:00
d1eb81fe52 Update README.md
I've made a landing page in notion & hosted it on Netlify using your Locolotion script.So I thought the website would be a good addition to your "sites built with notion" list.
2021-09-26 13:02:57 +05:30
d862e55922 Merge pull request #81 from zvedenyuk/master
Added website to "Sites built with Loconotion"
2021-09-15 11:25:57 +01:00
ea72910046 Added website to "Sites built with Loconotion" 2021-09-15 04:24:31 +03:00
b9d5c94582 Merge pull request #62 from ecolabardini/master
Use specific Chrome version
2021-09-07 08:16:48 +01:00
b9fd73f777 Merge pull request #75 from meSunnySrivastava/new-url-format
Use custom new Notion url format instead of hardcoded default one
2021-09-07 08:15:21 +01:00
9273cf9cb1 Merge pull request #73 from flipio-ru/leshchenko1979/issue71
Fix disappearing list markers and width issues
2021-09-07 08:14:41 +01:00
82431f4d7a Merge pull request #59 from flipio-ru/fix-ios-padding
Fixes the iOS extra image bottom padding issue
2021-09-07 08:14:27 +01:00
fc239151ee Use custom new Notion url format instead of hardcoded default one 2021-08-26 21:13:28 +05:30
c683df0a55 Fix width issues 2021-08-22 15:09:40 +03:00
08102a8c2e Fix disappearing list markers 2021-08-10 22:40:23 +03:00
9c5a0d7aac Fix excess padding below images 2021-08-10 22:31:18 +03:00
4bd84256e0 Merge pull request #70 from bryanhpchiang/master
Fixed parsing for notion.site URLs
2021-07-22 17:16:12 +01:00
8be7011f3f Fixed parsing 2021-07-21 19:48:59 -07:00