drewroberts / blog Goto Github PK
View Code? Open in Web Editor NEW๐ Laravel package for my opinionated style of adding blog posts to Laravel projects
License: MIT License
๐ Laravel package for my opinionated style of adding blog posts to Laravel projects
License: MIT License
This package will also provide the Laravel Authorization Policies needed for Blog Posts (#5) and each of the related models.
This is a placeholder to check the behavior when an application contains fallback routes once the internal routing of this package is finalized.
Quick ideas for bahvior to review:
The following models should have nullable relationships to Webpage (TIPOFF/seo#19):
This will make it easy to track their SEO rankings (TIPOFF/seo#18) over time.
There should be an option with Pages (#15) that allows a Page to redirect & route visitors through the Controller to the parent Page.
An example of a use case for this is with Pages that are created for Locations (TIPOFF/locations#42) where there is only 1 Location in a Market (TIPOFF/locations#41). In that case, I want to redirect the visitor to the parent Page (the Market page).
Need to implement tests for every feature of the package.
I like videos to have their own model and be automatically pulled from YouTube with their cover Image and description, etc.
We will need the following Pages (#15) in a data migration for this package:
/
(Homepage - not sure how to handle this one with routing)/company
(About Us Page)/blog
Other packages will add their own Page data migrations.
This package is the first one in the set of packages and probably the only one that needs to implement Sites model and add ''site_id'' to every table to allow MultiSite usage of this package in projects. There should be a default site with a data migration of it to the database.
I need to also think through an implementation of allowing pages & the post models to be added to multiple sites or for simplicity sake to just disallow that. I can think of quite a few instances where I would want the same page of each of the websites in the project.
We'll allow the project to handle the MultiSite routing code and can do that later and provide the necessary steps in a ReadMe file but shouldn't overcomplicate the code in this package for the many single site projects that use it.
There should be a location_based
boolean field on pages (#15) that defaults to false. It will be utilized in the tipoff/locations package and not be utilized at all if the application does not have that package installed.
If the boolean is true, then the tipoff/locations package will handle the Layout change for the page at that slug and will add the slug to the correct Markets & Locations routing structure.
There should be a model named Layout that is used in a somewhat similar concept to WordPress' page layouts:
The Layout should define a model like Page (#15) or Market (TIPOFF/locations#41) and then define a blade file. The model can then have a belongsTo
relationship with Layout and there can be a default set by the package in the config file for each model of that package that will be included in web routes. That blade template can be published and updated in the application and other variations could also be created both in the package and in the application (example: AMP validated layouts). Each entry in that model can then use the default layout or define its own.
I want the default routes to be added to this package with config options for adjusting based on the project. This will require controllers in the package and also view templates for each of the models.
Create authorization policies in package and register them in the service provider.
Similar to how WordPress handles "View" buttons on Posts, I would like for all of the resources in this package to have a "View" link in both the Nova Index and the Resource Show pages that is a simple ahref link to the path accessor of the resource. Here is a screenshot of what WordPress does:
YouTube takes it further and does a "Copy" button for the path to the resource that would be great on the resource Show page with the "View" Button next to it and the path as in their example:
I would like to use the Google Analytics API to pull the views of Blog Posts (#5) to have the total views of the Posts to display on the website.
As shown in #87:
The copyable field should also display the url as a clickable hyperlink that opens in a new tab. While sixlive/nova-text-copy-field
has been valuable in serving as a prebuilt component, it does not support the Nova Text field native method of asHtml()
, which would normally make it possible to pass in HTML to trigger the hyperlinking of field content.
Started under a custom fork under https://github.com/chx2/nova-text-copy-field, I will need to implement a working asHTML()
method for any packages that will intend to use the copyable text field.
Need to update the ReadMe file to keep it current with package features and document how to best utilize it in a Laravel project.
Add various URL path structure options to config file.
I like images to have their own Model and be implemented with Cloudinary
This package will also provide the Laravel Nova resources needed for each of the Models.
If a Page (#15) has a relationship to Market (TIPOFF/locations#41) or Location (TIPOFF/locations#42), then the Slug can't be updated in Nova. They will be updated in the Nova resource for Market or Location and that change will be synced to the Page.
Need to update them to correctly reference the $userResource like this example:
https://github.com/vyuldashev/nova-permission/blob/master/src/Permission.php
All blog Posts (#5) will be written in Markdown. This will be parsed in the views. We'll use this package for it:
If a blog Post (#5) has a NULL Series (#4), then the path for it should be:
/blog/{post:slug}
If it has a Series relationship, then it should use the current routing in Issue #50 of:
/{topic}/{series}/{post}
The /blog
route will use the Page with that slug in the data migration (#66) in the controller to display content on it.
The migration to add layouts to the database is not working. The migration is not inserting any data when I run the migrations in the tipoff/demo application.
The Blog controller should accept routes for Pages (#15) that are parent Pages and have child Pages and grandchild Pages.
Create Permissions (TIPOFF/authorization#22) & assign to default Roles (TIPOFF/authorization#21) using the new PermissionMigration
and Helper in tipoff/authorization package:
This package should create the following Roles:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.