diff --git a/website/_redirects b/website/_redirects index 995044410..f3728e8eb 100644 --- a/website/_redirects +++ b/website/_redirects @@ -3,13 +3,19 @@ # See the README file in this directory for documentation. Please do not # modify or delete existing redirects without first verifying internally. +/support.html / +/support / +/sponsors.html / +/sponsors / +/about.html /intro +/about /intro + /intro/index /intro /docs/index /docs /docs/boxes.html /docs/boxes +/docs/boxes /docs/boxes /docs/experimental/index.html /docs/experimental -/docs/experimental/ /docs/experimental /docs/multi-machine/index.html /docs/multi-machine -/docs/multi-machine/ /docs/multi-machine /docs/virtualbox/index.html /docs/providers/virtualbox /docs/virtualbox/* /docs/providers/virtualbox/:splat /docs/vmware/index.html /docs/providers/vmware diff --git a/website/_temporary_scripts/changelog.md b/website/_temporary_scripts/changelog.md deleted file mode 100644 index 0e041ccaf..000000000 --- a/website/_temporary_scripts/changelog.md +++ /dev/null @@ -1 +0,0 @@ -# changes diff --git a/website/_temporary_scripts/fix_partials.js b/website/_temporary_scripts/fix_partials.js deleted file mode 100644 index 7f4224f74..000000000 --- a/website/_temporary_scripts/fix_partials.js +++ /dev/null @@ -1,18 +0,0 @@ -// This script removes any `layout` keys in mdx files in a given directory, -// recursively. In this project, we use a default layout for all topic content, -// so the layout key is not necessary unless a topic needs to render into a -// unique layout - -const glob = require('glob') -const path = require('path') -const fs = require('fs') -const matter = require('gray-matter') - -glob.sync(path.join(__dirname, '../pages/**/*.mdx')).map((fullPath) => { - let { content, data } = matter.read(fullPath) - content = content.replace( - /<%=\s*partial[(\s]["'](.*)["'][)\s]\s*%>/gm, - (_, partialPath) => `@include '${partialPath}.mdx'` - ) - fs.writeFileSync(fullPath, matter.stringify(content, data)) -}) diff --git a/website/_temporary_scripts/fix_unclosed_tags.js b/website/_temporary_scripts/fix_unclosed_tags.js deleted file mode 100644 index b6a5c724c..000000000 --- a/website/_temporary_scripts/fix_unclosed_tags.js +++ /dev/null @@ -1,16 +0,0 @@ -// This script replaces
, which is invalid in react, with
for all markdown files - -const glob = require('glob') -const path = require('path') -const fs = require('fs') - -glob.sync(path.join(__dirname, '../pages/**/*.mdx')).map((fullPath) => { - let content = fs.readFileSync(fullPath, 'utf8') - - // fix unclosed br tag - content = content.replace(/
/g, '
') - // fix unclosed img tags - content = content.replace(/(]+)(?/g, (_, m1) => `${m1} />`) - - fs.writeFileSync(fullPath, content) -}) diff --git a/website/_temporary_scripts/remove_sidebar_current.js b/website/_temporary_scripts/remove_sidebar_current.js deleted file mode 100644 index c628e288f..000000000 --- a/website/_temporary_scripts/remove_sidebar_current.js +++ /dev/null @@ -1,13 +0,0 @@ -// This script removes the "sidebar_current" key from frontmatter, as it is -// no longer needed. - -const glob = require('glob') -const path = require('path') -const fs = require('fs') -const matter = require('gray-matter') - -glob.sync(path.join(__dirname, '../pages/**/*.mdx')).map((fullPath) => { - let { content, data } = matter.read(fullPath) - delete data.sidebar_current - fs.writeFileSync(fullPath, matter.stringify(content, data)) -}) diff --git a/website/_temporary_scripts/rename.sh b/website/_temporary_scripts/rename.sh deleted file mode 100644 index 7cb2882ab..000000000 --- a/website/_temporary_scripts/rename.sh +++ /dev/null @@ -1,10 +0,0 @@ -# Renames the slew of markdown extensions in middleman all to .mdx -# Call with the path to the root folder, will convert recursively -# For example, bash _temp_rename.bash pages/packer -# This file can be removed once we have finished porting from the old version! - -find $1 -name "*.html.md" -exec rename 's/\.html.md$/.mdx/' '{}' \; -find $1 -name "*.html.markdown" -exec rename 's/\.html.markdown$/.mdx/' '{}' \; -find $1 -name "*.html.md.erb" -exec rename 's/\.html.md.erb$/.mdx/' '{}' \; -find $1 -name "*.html.markdown.erb" -exec rename 's/\.html.markdown.erb$/.mdx/' '{}' \; -find $1 -name "*.md" -exec rename 's/\.md$/.mdx/' '{}' \; diff --git a/website/_temporary_scripts/rename_partials.sh b/website/_temporary_scripts/rename_partials.sh deleted file mode 100644 index f8113a4cc..000000000 --- a/website/_temporary_scripts/rename_partials.sh +++ /dev/null @@ -1,13 +0,0 @@ -# Renames the slew of markdown extensions in middleman all to .mdx -# Call with the path to the root folder, will convert recursively -# For example, bash _temp_rename.bash pages/packer -# This file can be removed once we have finished porting from the old version! - -find $1 -name "*.html.md" -exec rename 's/\.html.md$/.mdx/' '{}' \; -find $1 -name "*.html.markdown" -exec rename 's/\.html.markdown$/.mdx/' '{}' \; -find $1 -name "*.html.md.erb" -exec rename 's/\.html.md.erb$/.mdx/' '{}' \; -find $1 -name "*.md" -exec rename 's/\.md$/.mdx/' '{}' \; -find $1 -name "_" -exec echo 'foo' \; -rename -v 's/\/_(.*)/\/$1/' pages/partials/*/*.mdx -rename -v 's/\/_(.*)/\/$1/' pages/partials/*/*/*.mdx -rename -v 's/\/_(.*)/\/$1/' pages/partials/*/*/*/*.mdx diff --git a/website/_temporary_scripts/transform_all.sh b/website/_temporary_scripts/transform_all.sh deleted file mode 100644 index 509550571..000000000 --- a/website/_temporary_scripts/transform_all.sh +++ /dev/null @@ -1,7 +0,0 @@ -# runs all transforms needed for a fresh content port - -sh _temporary_scripts/rename.sh pages/docs; -sh _temporary_scripts/rename.sh pages/vmware; -sh _temporary_scripts/rename.sh pages/intro; -node _temporary_scripts/fix_unclosed_tags.js; -node _temporary_scripts/fix_partials.js;