https://github.com/vaporexampleslab/quickstart-bootstrap-blog
https://github.com/vaporexampleslab/quickstart-bootstrap-blog
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vaporexampleslab/quickstart-bootstrap-blog
- Owner: VaporExamplesLab
- License: mit
- Created: 2019-03-11T22:16:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-17T22:52:41.000Z (about 7 years ago)
- Last Synced: 2025-06-01T15:12:46.701Z (about 1 year ago)
- Language: HTML
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [quickstart-bootstrap-blog][t]
[t]:https://github.com/VaporExamplesLab/quickstart-bootstrap-blog
[Getting Started](#GettingStarted) •
[Original Setup](#OriginalSetup) •
[Resources](#Resources)
## Getting Started [▴](#toc)
**Prerequisites**
* [Install Xcode 10 ⇗](https://itunes.apple.com/us/app/xcode/id497799835?mt=12)
* [Install homebrew ⇗](https://brew.sh/)
* [Install vapor toolbox ⇗](https://docs.vapor.codes/3.0/install/macos/)
**Download|Clone & Run**
Steps to download repository:
``` bash
## go to your working directory
cd
## download and unzip
wget https://github.com/VaporExamplesLab/quickstart-bootstrap-blog/archive/master.zip
unzip master.zip -d quickstart-bootstrap-blog
rm master.zip # remove download
cd quickstart-bootstrap-blog-master
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
Or, alternate steps to clone repository instead of download:
``` bash
## go to your working directory
cd
## either clone
## add --bare option for an unattached instance
git clone git@github.com:VaporExamplesLab/quickstart-bootstrap-blog.git
cd quickstart-bootstrap-blog
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
**Directory Structure**
``` bash
blog_content_original/
html/
# markdown/…/*.md pages map to blog_content_processed/leaf/_m/…/*.leaf
# markdown/…/*_files/* map to blog_content_processed/public/_m/…/*.leaf
markdown/
yyyy/
MM/
article_files
article.md
paprika/
#
blog_content_processed/
leaf/
_h/
_m/
yyyy/
mm/
article.leaf
_r/
public/
_h/
_m/
yyyy/
mm/
article_files/*
_r/
quickstart-bootstrap-blog/
Public/ # must match URL for relative addressing
_h → blog_content_processed/public/_h
_m → blog_content_processed/public/_m
_r → blog_content_processed/public/_r
Resources/
Views/ # path to leaf can be revised by router ?
_h → blog_content_processed/leaf/_h
_m → blog_content_processed/leaf/_m
_r → blog_content_processed/leaf/_r
```
_route_
``` swift
```
_leaf template_
``` leaf
```
``` bash
cd quickstart-bootstrap-blog
ln -s ../../blog_content_processed/public/_h Public/_h
ls -l Public/_h/
ln -s ../../blog_content_processed/public/_m Public/_m
ls -l Public/_m/
ln -s ../../blog_content_processed/public/_r Public/_r
ls -l Public/_r/
ls -l Public
ln -s ../../../blog_content_processed/leaf/_h Resources/Views/_h
ls -l Resources/Views/_h/
ln -s ../../../blog_content_processed/leaf/_m Resources/Views/_m
ls -l Resources/Views/_m/
ln -s ../../../blog_content_processed/leaf/_r Resources/Views/_r
ls -l Resources/Views/_r/
ls -l Resources/Views
```
Set Xcode scheme to "Run > My Mac".

Click the run button and check the results in a browser at `http://localhost:8080`.

## Original Setup [▴](#toc)
The following steps were completed to create the `quickstart-bootstrap-blog` example.
**Create Vapor Website Project**
Create a `quickstart-bootstrap-blog` project from the command line terminal:
``` bash
vapor new quickstart-bootstrap-blog --web
cd quickstart-bootstrap-blog
# add directory for README.md assets
mkdir README_files
touch README_files/.git_keep # create file so folder is not empty for `git`
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
## Resources [▴](#toc)
* [Bootstrap ⇗](https://getbootstrap.com)