fix: Initial welcome docs account for new title field

This commit is contained in:
Tom Moor
2020-04-05 15:41:29 -07:00
parent 9338a54fe0
commit 8819a0836e
5 changed files with 8 additions and 12 deletions

View File

@@ -142,13 +142,17 @@ Team.prototype.provisionFirstCollection = async function(userId) {
// For the first collection we go ahead and create some intitial documents to get
// the team started. You can edit these in /server/onboarding/x.md
const onboardingDocs = ['support', 'integrations', 'editor', 'philosophy'];
for (const name of onboardingDocs) {
const onboardingDocs = [
'❤️ Support',
'🚀 Integrations & API',
'📝 Our Editor',
'👋 What is Outline',
];
for (const title of onboardingDocs) {
const text = await readFile(
path.join(__dirname, '..', 'onboarding', `${name}.md`),
path.join(__dirname, '..', 'onboarding', `${title}.md`),
'utf8'
);
const { title } = parseTitle(text);
const document = await Document.create({
isWelcome: true,
parentDocumentId: null,