Files
test-repo/website/siteConfig.js
T
Jed Fox 9a1b57587d Add 1.10 blog post (#3659)
* Add 1.10 blog post

Copied from releases page

* Change a few things

* Add overview of changes

* Lint docs

* Scaffold out release notes

* Add prettier-ignores

* docs: add missing references

* docs: fix heading level

* docs: fix example

* Document plugin API

* Use shellsession

* docs: fix example

* docs: fix links

* Fix heading level

* change: ts upgrade -> numeric separator support

Instead of mentioning we updated the typescript version, we should emphasize on what value we added to users

* Fix repeated phrase

* add comment type annotation explanation

* Add note on no more wrapping () JSX elements

* Grammar

* Add more release notes

* Fill out remaining release notes

* Fix lint

* Add verb

* Fix heading level

* Update 2018-01-10-1.10.0.md

* Update 2018-01-10-1.10.0.md

* Add twitter buttons

* docs: add note for #3694

* Fix cake
2018-01-10 23:03:39 +11:00

84 lines
2.2 KiB
JavaScript

"use strict";
// Docs: https://docusaurus.io/docs/en/site-config.html
const parseYaml = require("js-yaml").safeLoad;
const path = require("path");
const fs = require("fs");
const PACKAGE = require("../package");
const GITHUB_URL = `https://github.com/${PACKAGE.repository}`;
function loadYaml(fsPath) {
return parseYaml(fs.readFileSync(path.join(__dirname, fsPath), "utf8"));
}
const users = loadYaml("./data/users.yml");
const editors = loadYaml("./data/editors.yml");
const supportedLanguages = loadYaml("./data/languages.yml");
const siteConfig = {
title: "Prettier",
tagline: "Opinionated Code Formatter",
githubUrl: GITHUB_URL,
url: PACKAGE.homepage,
baseUrl: "/",
projectName: PACKAGE.name,
repo: PACKAGE.repository,
cname: "prettier.io",
users,
editors,
supportedLanguages,
/* base url for editing docs, usage example: editUrl + 'en/doc1.md' */
editUrl: `${GITHUB_URL}/edit/master/docs/`,
headerLinks: [
{ href: "/playground/", label: "Playground" },
{ doc: "index", label: "About" },
{ doc: "install", label: "Usage" },
{ blog: true, label: "Blog" },
{ search: true },
{ href: GITHUB_URL, label: "GitHub" }
],
/* path to images for header/footer */
headerIcon: "icon.png",
footerIcon: "icon.png",
favicon: "icon.png",
/* colors for website */
colors: {
primaryColor: "#1A2B34",
secondaryColor: "#808080"
},
highlight: {
theme: "default"
},
useEnglishUrl: true,
scripts: ["https://buttons.github.io/buttons.js"],
algolia: {
apiKey: process.env.ALGOLIA_PRETTIER_API_KEY,
indexName: "prettier"
},
markdownPlugins: [
// ignore `<!-- prettier-ignore -->` before passing into Docusaurus to avoid mis-parsing (#3322)
md => {
md.block.ruler.before(
"htmlblock",
"prettierignore",
(state, startLine) => {
const pos = state.bMarks[startLine];
const max = state.eMarks[startLine];
if (/<!-- prettier-ignore -->/.test(state.src.slice(pos, max))) {
state.line += 1;
return true;
}
return false;
}
);
}
],
separateCss: ["static/separate-css"],
gaTrackingId: "UA-111350464-1",
twitter: true
};
module.exports = siteConfig;