mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 00:57:53 +02:00
RSS/ATOM Feed added, Prism changes, and global Copyright notice. (#94)
* Add Reason support to Prism.js * Add XML/ATOM feed. Generates for both localhost and build script. Adds meta links to feeds to all html files. * Updated /core/Footer.js to pull from siteConfig
This commit is contained in:
parent
92ce92ee59
commit
dc835770a0
15 changed files with 285 additions and 39 deletions
33
lib/generate-feed.js
Normal file
33
lib/generate-feed.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
require("babel-register")({
|
||||
babelrc: false,
|
||||
only: [__dirname, process.cwd() + "/core"],
|
||||
plugins: [require("./server/translate-plugin.js")],
|
||||
presets: ["react", "latest"]
|
||||
});
|
||||
|
||||
// initial check that required files are present
|
||||
const chalk = require("chalk");
|
||||
const fs = require("fs");
|
||||
const CWD = process.cwd();
|
||||
|
||||
if (!fs.existsSync(CWD + "/siteConfig.js")) {
|
||||
console.error(
|
||||
chalk.red("Error: No siteConfig.js file found in website folder!")
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// generate rss feed
|
||||
const feed = require("./server/feed.js");
|
||||
console.log(feed());
|
Loading…
Add table
Add a link
Reference in a new issue