feature-blog #4

Open
b14r wants to merge 4 commits from b14r/Neato:feature-blog into main
First-time contributor

Hi Adam,
With this PR I want to propose a first revision for the blog power-up and I would love to get your feedback.

Some thoughts:

  • I needed to use the shutdown hook because I wanted to give the ability to also add blog template functions in the templates/ directory (nex to the content/ directory).
  • I created the blog template function based on what you did in the font-awesome power-up.
  • I tried to split up the functions a bit in template functions (blog_functions.php) and utils functions (blog_utils.php) for this blog power-up.
  • There is an optional blog.yaml config.
  • I added some modifiers like limit, tpl_parent, tpl_item to offer customizations I'm looking for in my own blog.
  • Do you want to have some disclaimer in the power-up files?

Keep in mind, it's been 11 years that I wrote PHP. No AI was used. Be gentle. 😄

Hi Adam, With this PR I want to propose a first revision for the blog power-up and I would love to get your feedback. Some thoughts: - I needed to use the shutdown hook because I wanted to give the ability to also add blog template functions in the templates/ directory (nex to the content/ directory). - I created the blog template function based on what you did in the font-awesome power-up. - I tried to split up the functions a bit in template functions (`blog_functions.php`) and utils functions (`blog_utils.php`) for this blog power-up. - There is an optional `blog.yaml` config. - I added some modifiers like limit, tpl_parent, tpl_item to offer customizations I'm looking for in my own blog. - Do you want to have some disclaimer in the power-up files? Keep in mind, it's been 11 years that I wrote PHP. No AI was used. Be gentle. 😄
With the offset modifier you can skip items at the start of the recent_posts array.

In my use case I want to show the most recent blog post in a card style fashion.
While showing the rest of the posts in a list, without the most recent blog post. Here comes the [offset:1] modifier into action!
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feature-blog:b14r-feature-blog
git switch b14r-feature-blog

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff b14r-feature-blog
git switch b14r-feature-blog
git rebase main
git switch main
git merge --ff-only b14r-feature-blog
git switch b14r-feature-blog
git rebase main
git switch main
git merge --no-ff b14r-feature-blog
git switch main
git merge --squash b14r-feature-blog
git switch main
git merge --ff-only b14r-feature-blog
git switch main
git merge b14r-feature-blog
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
neatnik/Neato!4
No description provided.