How to use bisheng - 5 common examples

To help you get started, we’ve selected a few bisheng examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ant-design / ant-design-mobile / site / kitchen / src / template / KitchenSink / Demo.jsx View on Github external
/* eslint react/no-danger: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
import WhiteSpace from 'antd-mobile/lib/white-space';
import 'antd-mobile/lib/white-space/style';
import Button from 'antd-mobile/lib/button';
import 'antd-mobile/lib/button/style';
import WingBlank from 'antd-mobile/lib/wing-blank';
import 'antd-mobile/lib/wing-blank/style';
import NoticeBar from 'antd-mobile/lib/notice-bar';
import 'antd-mobile/lib/notice-bar/style';
import collect from 'bisheng/collect';
import { getQuery } from '../../../../utils';

@collect(async (nextProps) => {
  const { pathname } = nextProps.location;
  const pageDataPath = pathname.replace('-cn', '').split('/');
  const pageData = nextProps.utils.get(nextProps.data, pageDataPath);
  if (!pageData) {
    throw 404; // eslint-disable-line no-throw-literal
  }

  const locale = getQuery('lang') || 'en-US';
  const pageDataPromise = typeof pageData === 'function' ?
    pageData() : (pageData[locale] || pageData.index[locale] || pageData.index)();
  const demosFetcher = nextProps.utils.get(nextProps.data, ['components', nextProps.params.component, 'demo']);
  if (demosFetcher) {
    const [localizedPageData, demos] = await Promise.all([pageDataPromise, demosFetcher()]);
    return { localizedPageData, demos, locale };
  }
github jazzysnail / blog / bisheng-theme-biu / template / post.jsx View on Github external
import React from 'react';
// style
import '../static/style';
// components
import Layout from './layout';
import 'gitment/style/default.css';
import Gitment from 'gitment';
const Rlink = require('bisheng/router').Link;

// 评论区
class Comments extends React.Component {
  componentDidMount() {
    const gitment = new Gitment({
      id: 'jazzysnail',
      owner: 'jazzysnail',
      repo: 'blog',
      title: '666',
      oauth: {
        client_id: '43639d4bf6cd906e8b5f',
        client_secret: 'fc798d7c539ae7f1d2888443b2ec364334d4aa5f',
      }
    });
    gitment.renderHeader('commentsH');
    gitment.renderComments('commentsC');
github salt-ui / saltui / dev.js View on Github external
const BiSheng = require('bisheng/lib');

BiSheng.start({});
// "bisheng": "concurrently \"bisheng start -c ./bisheng/bisheng.site.config.js --no-livereload\" \"bisheng start -c ./bisheng/bisheng.kitchen.config.js --no-livereload\"",
// "bisheng":"bisheng start -c ./bisheng/bisheng.site.config.js",
github jazzysnail / blog / theme / template / Archive.js View on Github external
));
    }

    entryList.push(_react2.default.createElement(
      'div',
      { className: 'item', key: index },
      _react2.default.createElement(
        'h2',
        { className: 'item-title', id: meta.title },
        _react2.default.createElement(
          'time',
          null,
          meta.publishDate.slice(0, 10) + ' '
        ),
        _react2.default.createElement(
          _router.Link,
          { to: '/' + meta.filename.replace(/\.md$/i, '') },
          meta.title
        )
      ),
      !description ? null : _react2.default.createElement(
        'div',
        { className: 'item-description' },
        toReactComponent(description)
      )
    ));
  });
  return _react2.default.createElement(

bisheng

Transform Markdown(and other static files with transformers) into a SPA website using React.

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis