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

Simplicity and validation #10

Merged
merged 12 commits into from Oct 14, 2019

Conversation

@zerosonesfun
Copy link
Contributor

zerosonesfun commented Sep 27, 2019

These changes make things simple, ensure the feeds validate, and keep the feed post content text only versus trying to include HTML. This last part is admittedly a personal preference. I do not think we need the feeds to include the full HTML for posts. Plain text descriptions/summaries should suffice and help to ensure validation and feed reader compatibility.

The main reason I started making these changes is because the ID portion of the atom feed wasn’t validating. It was only pulling in the post ID which happens to be “1” every time. This pull request makes the ID the full permalink which validates.

@dexif

This comment has been minimized.

Copy link

dexif commented Sep 27, 2019

+1

@AmauryCarrade

This comment has been minimized.

Copy link
Owner

AmauryCarrade commented Sep 27, 2019

Copy link
Owner

AmauryCarrade left a comment

H, and again sorry for the delay. I added a few comments to be addressed before the merge, but thanks a lot for the PR :) .

README.md Outdated Show resolved Hide resolved
views/atom.blade.php Outdated Show resolved Hide resolved
views/rss.blade.php Show resolved Hide resolved
@zerosonesfun

This comment has been minimized.

Copy link
Contributor Author

zerosonesfun commented Oct 13, 2019

I noticed another small issue when validating the atom feed. It did not like the site URL not ending with a “/“. Therefore, I added a slash in the code.

There is just one more warning at times but it is not a big deal. Sometimes, depending on the post (a post with no text, just an image, for example), the summary may end up being blank. The feed validator still marks the feed as valid, but gives a warning that there shouldn’t be blank summaries. In the future, some type of if/else coding could solve this... if summary is blank, add the text, “No summary found.” This way, there is never a blank summary.

Here are screenshots of my feeds validating. As I state above in my replies, the couple changes you suggest are not necessary; the feeds are valid (you will see a warning about the utf-8 encoding but that’s just something with my server. Others may not get that warning...

RSS valid:

0600-BE66-232-F-4106-9-F66-E108-C1-B75978

ATOM valid:

609132-F1-5-D56-4-F67-986-B-833-A0-FF00-D31

zerosonesfun and others added 6 commits Oct 13, 2019
Co-Authored-By: Amaury Carrade <amaury@carrade.eu>
Added html attribute and changed summary to full HTML content.
Changed description to full HTML content.
@zerosonesfun

This comment has been minimized.

Copy link
Contributor Author

zerosonesfun commented Oct 13, 2019

@AmauryCarrade,

Please review my latest changes. Here is what I have done:

  • Changed atom.blade.php so that it will now include the full HTML content of the post; and it includes the type=html attribute.
  • Changed rss.blade.php so that it will also include the full HTML content of the post.
    • By default, the extension will use these full HTML versions.
  • Added a new atom.blade.nonHTML.php file and a rss.blade.nonHTML.php file which are the same feeds except they will only show plain text excerpts of the posts.
    • This means, if users want, they can remove or rename the original blade.php files, and remove the "nonHTML" part in these filenames and then the extension will use the non HTML / excerpt versions instead.
@AmauryCarrade

This comment has been minimized.

Copy link
Owner

AmauryCarrade commented Oct 14, 2019

This means, if users want, they can remove or rename the original blade.php files, and remove the "nonHTML" part in these filenames and then the extension will use the non HTML / excerpt versions instead.

One should never change anything in the vendor directory, so I'm not convinced. This being said, I'll merge these changes and add a settings interface to configure:

  • full text vs extract;
  • plain vs HTML;
  • how many entries per feed.

Thanks for your contributions!

@AmauryCarrade AmauryCarrade merged commit a2c7aa1 into AmauryCarrade:master Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.