How to use richtypo - 10 common examples

To help you get started, we’ve selected a few richtypo 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 sapegin / richtypo.js / example / example.js View on Github external
const richtypo = require("richtypo");

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, " ")); // Make non-breaking spaces visible

richtypo.lang("en");

print(
  richtypo.rich(
    "Welcome to the world of beautiful web typography — only with Richtypo."
  )
);
print(richtypo.title("Beautiful & Awesome Web Typography with “Richtypo”"));
print(
  richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example.js View on Github external
const richtypo = require('richtypo');

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, ' ')); // Make non-breaking spaces visible

richtypo.lang('en');

print(
	richtypo.rich(
		'Welcome to the world of beautiful web typography — only with Richtypo.'
	)
);
print(richtypo.title('Beautiful & Awesome Web Typography with “Richtypo”'));
print(
	richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example.js View on Github external
const richtypo = require('richtypo');

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, ' ')); // Make non-breaking spaces visible

richtypo.lang('en');

print(
	richtypo.rich(
		'Welcome to the world of beautiful web typography — only with Richtypo.'
	)
);
print(richtypo.title('Beautiful & Awesome Web Typography with “Richtypo”'));
print(
	richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example / example.js View on Github external
const richtypo = require("richtypo");

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, " ")); // Make non-breaking spaces visible

richtypo.lang("en");

print(
  richtypo.rich(
    "Welcome to the world of beautiful web typography — only with Richtypo."
  )
);
print(richtypo.title("Beautiful & Awesome Web Typography with “Richtypo”"));
print(
  richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example / example.js View on Github external
const richtypo = require("richtypo");

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, " ")); // Make non-breaking spaces visible

richtypo.lang("en");

print(
  richtypo.rich(
    "Welcome to the world of beautiful web typography — only with Richtypo."
  )
);
print(richtypo.title("Beautiful & Awesome Web Typography with “Richtypo”"));
print(
  richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example.js View on Github external
const richtypo = require('richtypo');

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, ' ')); // Make non-breaking spaces visible

richtypo.lang('en');

print(
	richtypo.rich(
		'Welcome to the world of beautiful web typography — only with Richtypo.'
	)
);
print(richtypo.title('Beautiful & Awesome Web Typography with “Richtypo”'));
print(
	richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example / example.js View on Github external
const richtypo = require("richtypo");

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, " ")); // Make non-breaking spaces visible

richtypo.lang("en");

print(
  richtypo.rich(
    "Welcome to the world of beautiful web typography — only with Richtypo."
  )
);
print(richtypo.title("Beautiful & Awesome Web Typography with “Richtypo”"));
print(
  richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / richtypo.js / example.js View on Github external
const richtypo = require('richtypo');

// eslint-disable-next-line no-console
const print = t => console.log(t.replace(/\xa0/g, ' ')); // Make non-breaking spaces visible

richtypo.lang('en');

print(
	richtypo.rich(
		'Welcome to the world of beautiful web typography — only with Richtypo.'
	)
);
print(richtypo.title('Beautiful & Awesome Web Typography with “Richtypo”'));
print(
	richtypo.full('Use "Richtypo" - make typography on your site beautiful.')
);
github sapegin / sweet / swe.js View on Github external
javascripts = data.javascripts;

	for (var fileId in datasets) {
		var dataset = datasets[fileId];

		// Special data
		dataset.map = sitemap;
		dataset.files = versions;
		dataset.javascripts = javascripts;
		dataset.debug = isDebug;
		for (var key in commons) {
			dataset[key] = commons[key];
		}

		// Typography
		richtypo.lang(dataset.lang);
		dataset.pageTitle = dataset.title;
		if (o.typographer !== false) {
			if (dataset.title)
				dataset.title = richtypo.title(dataset.title);
			if (dataset.content)
				dataset.content = richtypo.rich(dataset.content);
		}

		// Expose typographer to templates
		dataset.t = richtypo.rich;
		dataset.tt = richtypo.title;
		dataset.tl = richtypo.lite;

		// Expose Markdown parser to templates
		dataset.md = marked;
		dataset.mds = markedString;
github sapegin / sweet / lib / index.js View on Github external
var datasets = this.datasets,
			commons = this.commons;

		for (var fileId in datasets) {
			var dataset = datasets[fileId];

			// Special data
			dataset.map = this.sitemap;
			dataset.files = this.versions;
			dataset.debug = this.debug;
			for (var key in commons) {
				dataset[key] = commons[key];
			}

			// Typography
			richtypo.lang(dataset.lang);
			dataset.pageTitle = dataset.title;
			if (this.typographer !== false) {
				if (dataset.title)
					dataset.title = richtypo.title(dataset.title);
				if (dataset.content)
					dataset.content = richtypo.rich(dataset.content);
			}

			// Expose typographer to templates
			dataset.t = richtypo.rich;
			dataset.tt = richtypo.title;
			dataset.tl = richtypo.lite;

			// Expose Markdown parser to templates
			dataset.md = marked;
			dataset.mds = markedString;

richtypo

HTML and Markdown typography enhancer with extensible rules

MIT
Latest version published 3 months ago

Package Health Score

68 / 100
Full package analysis