Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tqt97/laravel-static-file-blog
Make blog laravel with static file markdown
https://github.com/tqt97/laravel-static-file-blog
laravel-framework markdown tailwind-css
Last synced: about 17 hours ago
JSON representation
Make blog laravel with static file markdown
- Host: GitHub
- URL: https://github.com/tqt97/laravel-static-file-blog
- Owner: tqt97
- Created: 2023-08-08T01:58:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-13T04:44:25.000Z (over 1 year ago)
- Last Synced: 2023-08-13T05:33:47.562Z (over 1 year ago)
- Topics: laravel-framework, markdown, tailwind-css
- Language: PHP
- Homepage:
- Size: 324 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build Blog Laravel 10 with markdown file
![screenshot](./screenshot.png)
### How to clone
- Clone this project
- Step 1: `composer install`
- Step 2: ` npm install`
- Step 3: cp .env.example .env
- Step 4: `php artisan key:generate`
- Step 5: `npm run build`
- Step 6: `npm run dev`
- Step 7: ` php artisan serve`Or you can do (**In step 3 and step 4 i have merged into 1 step**)
- Step 1: `composer install`
- Step 2: `npm install`
- Step 3: `php artisan clone`
- Step 4: `npm run build`
- Step 5: `npm run dev`
- Step 6: `php artisan serve`### Step to make project
1. Install tailwincss, plugin
```
https://tailwindcss.com/docs/guides/laravel
https://tailwindcss.com/docs/typography-plugin
```- Config follow guide
2. Install sheets, laravel-markdown
```
https://github.com/spatie/sheets
https://spatie.be/docs/laravel-markdown/v1/installation-setup
```- Config follow guide
- Register custom route for Sheet in _RouteServiceProvider_
- Customize parser markdown with **laravel markdown** in _App/ContentParsers/MarkdownWithFrontMatterParser_3. Implement posts
- Make model, controller, view, routes
4. Implement tags
- Make controller, view, route
5. Create posts markdown file in `storage/app/posts`- Structure of markdown file
> Name file format : [date.name.md]
**eg:** 2023-08-08.first-blog.md
```[md]
---
title: Your title hereauthor: Nam of author
teaser: Your teaser
tags : ['tag1','tag2']
---
Content here !
```#### \*\* Enhancement
1. ##### Make command to generate bootstrap blog file
- Install dependencies
```
npm i --save prompts
npm i --save dedent
```
- Run command by```[js]
node generatePost.js
```And result
```[md]
---
title: New Blog
author: Tuantq
tags: []
teaser:
---
Content go here !
```