https://github.com/weaponsforge/markdown-viewer
View MD files as static web pages using React (CRA).
https://github.com/weaponsforge/markdown-viewer
create-react-app gh-pages github-actions github-pages markdown md react
Last synced: 15 days ago
JSON representation
View MD files as static web pages using React (CRA).
- Host: GitHub
- URL: https://github.com/weaponsforge/markdown-viewer
- Owner: weaponsforge
- Created: 2021-08-21T03:36:34.000Z (over 4 years ago)
- Default Branch: dev
- Last Pushed: 2021-08-24T19:34:26.000Z (over 4 years ago)
- Last Synced: 2025-03-26T09:37:19.375Z (about 1 year ago)
- Topics: create-react-app, gh-pages, github-actions, github-pages, markdown, md, react
- Language: JavaScript
- Homepage: https://weaponsforge.github.io/markdown-viewer/
- Size: 8.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## markdown-viewer
> React (CRA) markdown experiments.
### Requirements
- NodeJS v12+
- Text editor/IDE (VSCode is recommended)
### Content
- Installation
- Usage
## Installation
1. Clone this repository.
`git clone https://github.com/weaponsforge/markdown-viewer.git`
2. Install dependencies.
`npm install`
3. Temporarily edit `package.json` when working on localhost, to workaround CRA's internal `PUBLIC_URL` naming mechanism. Remove `/markdown-viewer` from the **homepage** key:
```
{
"homepage": "https://weaponsforge.github.io",
"name": "markdown-viewer",
...
}
```
> **NOTES:**
> - Remember to restore back to `"homepage": "https://weaponsforge.github.io/markdown-viewer"` when deploying to Github Pages. **/markdown-viewer** is required when the CRA is deployed under a `https://{username}.github.io/{repo-name}` Github Pages hosting.
> - Set the GitHub repository's secret variable `secret.REACT_APP_PUBLIC_URL=/markdown-viewer`
## Available Scripts
### `npm start`
Run the local react app for development.
### `npm run build`
Bulid the app for production deployment.
### `npm run static`
- Requires `npm run build`.
- Run the static build app from a localhost web server.
### `npm run lint`
Check the codebase for lint errors.
### `npm run lint:fix`
Fix lint errors from the codebase.
@weaponsforge
20210820