Giter Site home page Giter Site logo

alexjsteffen / lcms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hominee/noer

0.0 1.0 0.0 3.71 MB

noer is a minimal, elegant and content-orientated static style blog CMS for those who prefer Markdown, static site, Web-Assembly. Markdown-based, simple to use; Static Style, github-pages supported, easy to deploy, serve and maintain; No JS/CSS/HTML touched; It makes content management Simple and Efficint.

Home Page: https://homelyguy.github.io/noer/

Shell 0.80% Rust 47.31% CSS 17.17% HTML 2.74% SCSS 0.37% JavaScript 31.62%

lcms's Introduction

What's Noer

noer is a minimal, elegant and content-orientated static style blog CMS for those who prefer Markdown, static site, Web-Assembly. Markdown-based, simple to use; Static Style, github-pages supported, easy to deploy, serve and maintain; No JS/CSS/HTML touched; It makes content management Simple and Efficint.

See demo site

How To Use

there are some requirements to be satisfied before we use it.

Pre-requisite

  • First of all, rust language and its building tool are necessary. you can install them following the description here;
  • Noer is built upon Web-Assembly and yew, the tutorial is recommanded before getting started;
  • build tools are needed -- trunk ( cargo install trunk ) -- wasm32-unknown-unknown ( rustup target add wasm32-unknown-unknown )

Github Page(Optional)

By default, the compiled output is not suitable for github pages, you got to enable it in the configuration file src/constant.rs

// if using github pages, it is required to deploy it to subpath
// specify the sub-path(ends with `/`)
// if not specified, it wont use sub-path
pub const SUBPATH: &str = "demo/";

Site Infomation

There are some basic info about the site in stc/constant.rs, including

  • MODE the current mode of the project, noer will set logger if in development mode and disable it is release mode.
  • ITEMS_PER_PAGE number of posts card that a page to display, note that it shall be multiple of 3.
  • ADMIN username of the ower.
  • SITE_NAME the name you want call the site.
  • LOGO_PIC: the logo display in the page.
  • AVATR_PIC avatar of the user
  • SITE_DESCRIPTION just site Description.
  • USER_INFO some extra infomation of the user present to viewers, such as social network, email, etc. Note that it is line-separated, each line is a key-value pair.

Compile

//normal 
sh ./build.sh

// use trunk to preview the site
	- without sub-path (`SUBPATH` is "/")
	  trunk serve 
  - with sub-path (`SUBPATH` is **not** "/")
		trunk serve --public-url /demo

Deployment

noer is static style site, Deploying noer as web application is just as simple as exposing the compiled index.html. here representing an example for nginx user

// /etc/nginx/sites-enabled/noer.conf
server {
	listen 8080;
	listen [::]:8080 ;

  root <absolute-path-to-project-directory>/<compiled-output-directory>;

	index index.html;

	server_name _;

	location / {
		try_files $uri $uri/ =404;
	}
}

// Note that the example above is deployed to localhost:8080/
// if you prefer to deploying to sub path `localhost:8080/demo/`
// configue the `subpath` in `src/constant.rs` 
// rename the compiled output directory to `demo`
server {
	...
  root <absolute-path-to-project-directory>;
	location /demo {
		...
	}
	...
}

Known Issues

  • due to the limit of yew, late or katex is not supported, see issue
  • some uncommon features of markdown are not supported so far (subscript/supscript, some Markup, Definition, Abbreviations)

lcms's People

Contributors

pc153educon avatar alexjsteffen avatar hominee avatar

Watchers

James Cloos 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.