Giter Club home page Giter Club logo

blogtemp's Introduction

npx create-react-blog

Create a blog with create-react-app, MDX, and Navi.
Themed after Gatsby's blog starter and Dan Abramov's overreacted.io.

See an example of the deployed app โ†’

Comes with:

๐Ÿ“ก RSS feed generation
๐Ÿท๏ธ Tagged posts
๐Ÿš€ HTML files for each URL
๐Ÿ“œ Smooth scrolling to hash links
๐Ÿ”ฅ Animated page loading transition
๐Ÿ”— Easy code splitting with import()
โฉ Paginated index page
โ›‘ TypeScript support

Getting started

The simplest way to get started is to use npx:

npx create-react-blog react-blog
cd react-blog
npm start

If you'd like to use TypeScript, just pass in a --typescript option:

npx create-react-blog react-blog --typescript

Alternatively, you can clone this repository yourself and use one of the templates yourself. If you take this approach, make sure to also run npm install:

git clone [email protected]:frontarm/create-react-blog.git
mv create-react-blog/template react-blog
cd react-blog
npm install
npm start

To statically build your blog and then start a local server for testing:

npm run build
npm run serve

The quickest and easiet way to deploy your blog is with Netlify, which is already set up and ready to go:

# Deploy to a test URL
npm run deploy

# Deploy to a production URL
npm run deploy:prod

Of course, since your site is just a bunch of HTML files, it can be deployed anywhere you'd like. Here's a couple alternatives:

How to...

To update the site's title, edit the metadata in src/siteMetadata.js.

To your bio and photo, edit the Bio component in src/components/Bio.js.

To change the site's colors, edit the :root block in src/index.module.css.

To create a new post, add a new directory to src/routes/posts that is prefixed with the new post's publication date, then create a post.js file inside it:

export default {
  title: `Learn How To Build This Blog From Scratch`,
  tags: ['react', 'navi'],
  spoiler: "An online course with loads of live demos and exercises.",
  getContent: () => import('./document.mdx'),
}

To set the maximum number of posts on an index page,, set the indexPageSize property of the object exported by src/siteMetadata.js.

To modify the generated HTML, update the src/renderPageToString.js file.

To add non-blog pages, just use Navi.createPage(), Navi.createSwitch() and Navi.createRedirect(). For an example, check the about page at src/routes/about/index.js. If you create a page, remember to add it to the root switch at src/routes/index.js.

To brush up on React's fundamentals, check out the React (without the buzzwords) and Asynchronous JavaScript courses.

blogtemp's People

Contributors

gautiert avatar jamesknelson avatar nenadfilipovic avatar tienpham94 avatar umstek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.