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

[DOCS] Revamp websites docs to use Lift #1060

Merged
merged 6 commits into from
Oct 24, 2021

Conversation

t-richard
Copy link
Member

Changed the whole website documentation

  • Removed the previous approaches to only feature Lift's construct
  • Link previous approaches in a new "Alternative solutions" section that points to a github permalink
  • Searched and removed all links to the deleted anchors
  • Changed the Laravel docs to also use Lift
  • Linked the Symfony documentation to the Websites one for more details
  • Changed the docs about static websites in (custom domains) to link to Lift's static website construct
  • Removed images that are not linked anymore

Let me know what you think.

Comment on lines +125 to +129
'/js/*': public/js
'/css/*': public/css
'/favicon.ico': public/favicon.ico
'/robots.txt': public/robots.txt
# add here any file or directory that needs to be served from S3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is how it works in Laravel but I'm really not sure as I'm not using it. Would be helpful if someone could confirm this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamCampbell maybe you can confirm whether those paths look correct? 🙏

This should be the list of static assets in a brand new/standard Laravel app. These static assets would be served by CloudFront + S3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the manifest.json file from the public folder will need to be shipped in the lambda image for this to work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, that path can be changed in php land. will either be located at public/mix-manifest.json or public/{artbirarypath}mix-manifest.json

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For arbitrary path it makes sense that users that know how to customize it will know to also reflect such customization here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree with Marco.

Said differently, we're looking for the "out of the box" config laravel mix provides.

But if the manifest needs to be included on the Lambda deployment package, we might want to state it in this doc or add it to the package.patterns config provided by the Laravel bridge.

We went with the second one in the Symfony Bridge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good then, because public/mix-manifest.json is not excluded from the Lambda deployment by default: https://github.com/brefphp/laravel-bridge/blob/master/config/serverless.yml#L15-L19

So it seems we are all good to merge here.

Thanks for the feedback both of you!

@deleugpn
Copy link
Member

Thanks! I'll need some time to review this. I'll try to fit it into this week.

Copy link
Member

@mnapoli mnapoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THIS IS AMAZING 🎉

I added minor feedback inline, thanks so much for tackling this!

docs/frameworks/laravel.md Show resolved Hide resolved
docs/websites.md Outdated Show resolved Hide resolved
docs/websites.md Show resolved Hide resolved
docs/websites.md Outdated Show resolved Hide resolved
docs/websites.md Outdated Show resolved Hide resolved
docs/websites.md Outdated Show resolved Hide resolved
@t-richard
Copy link
Member Author

I've fixed all comments. Let's wait for some other reviews 🙂

Copy link
Member

@mnapoli mnapoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all good to merge. Hoping to get a final confirmation on the path for Laravel's static assets.

@mnapoli mnapoli merged commit b7ad134 into brefphp:master Oct 24, 2021
@t-richard t-richard deleted the revamp-websites-docs branch October 24, 2021 09:44

After [deploying with `serverless deploy`](/docs/deploy.md), the static files will be served from `https://<bucket>.s3.<region>.amazonaws.com/`. Read the next section to upload your files.
The easiest approach is to use the
[Server-side website construct of the Lift plugin](https://github.com/getlift/lift/blob/master/docs/server-side-website.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those links are broken, as they are somehow rendered as https://github.com/getlift/lift/blob/master/docs/server-side-website.html but only exist as .md in the repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I fixed that with CouscousPHP/Couscous#178 in 8d531e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants