├── .editorconfig
├── .git-blame-ignore-revs
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── documentation.md
│ ├── enhancement.yml
│ └── possible-bug.yml
├── dependabot.yml
├── opencollective.yml
└── workflows
│ ├── ci.yml
│ ├── codeql.yml
│ ├── release.yml
│ └── scorecard.yml
├── .gitignore
├── .npmignore
├── .nvmrc
├── .prettierignore
├── .prettierrc.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── SECURITY.md
├── cmd.cjs
├── docs
├── coverage.md
├── coverage.njk
├── eleventy.coverage.js
└── release-instructions.md
├── eslint.config.js
├── package-lock.json
├── package.json
├── packages
└── client
│ ├── README.md
│ ├── generate-bundle.js
│ ├── package.json
│ ├── src
│ ├── BundleCore.js
│ ├── BundleEleventy.js
│ ├── BundleI18nPlugin.js
│ ├── BundleLiquid.js
│ ├── BundleMarkdown.js
│ ├── BundleNunjucks.js
│ └── shims
│ │ ├── process.cjs
│ │ └── shim-core.js
│ ├── test
│ ├── client-core.test.js
│ ├── client-eleventy.test.js
│ └── shared-tests.js
│ ├── update-package-json.js
│ └── vitest.config.js
├── scripts
├── release-dryrun.sh
└── release.sh
├── src
├── Adapters
│ ├── Engines
│ │ ├── Liquid.core.js
│ │ ├── Liquid.js
│ │ ├── Markdown.core.js
│ │ ├── Markdown.js
│ │ ├── Nunjucks.core.js
│ │ └── Nunjucks.js
│ ├── Packages
│ │ ├── chalk.client.js
│ │ ├── chalk.js
│ │ ├── inspect.core.js
│ │ ├── inspect.js
│ │ ├── semver.client.js
│ │ ├── semver.js
│ │ ├── url.core.js
│ │ └── url.js
│ ├── getDefaultConfig.core.js
│ └── getDefaultConfig.js
├── Benchmark
│ ├── Benchmark.js
│ ├── BenchmarkGroup.js
│ └── BenchmarkManager.js
├── Core.js
├── CoreMinimal.js
├── Data
│ ├── ComputedData.js
│ ├── ComputedDataProxy.js
│ ├── ComputedDataQueue.js
│ ├── ComputedDataTemplateString.js
│ ├── TemplateData.js
│ └── TemplateDataInitialGlobalData.js
├── Eleventy.js
├── EleventyCommonJs.cjs
├── EleventyExtensionMap.js
├── EleventyFiles.js
├── EleventyServe.js
├── Engines
│ ├── Custom.js
│ ├── FrontMatter
│ │ └── JavaScript.js
│ ├── Html.js
│ ├── JavaScript.js
│ ├── Liquid.js
│ ├── Markdown.js
│ ├── Nunjucks.js
│ ├── TemplateEngine.js
│ ├── TemplateEngineManager.js
│ └── Util
│ │ └── ContextAugmenter.js
├── Errors
│ ├── DuplicatePermalinkOutputError.js
│ ├── EleventyBaseError.js
│ ├── EleventyErrorHandler.js
│ ├── EleventyErrorUtil.js
│ ├── TemplateContentPrematureUseError.js
│ ├── TemplateContentUnrenderedTemplateError.js
│ └── UsingCircularTemplateContentReferenceError.js
├── EventBus.js
├── FileSystemSearch.js
├── Filters
│ ├── GetCollectionItem.js
│ ├── GetCollectionItemIndex.js
│ ├── GetLocaleCollectionItem.js
│ └── Url.js
├── GlobalDependencyMap.js
├── LayoutCache.js
├── Plugins
│ ├── HtmlBasePlugin.js
│ ├── HtmlRelativeCopyPlugin.js
│ ├── I18nPlugin.js
│ ├── IdAttributePlugin.js
│ ├── InputPathToUrl.js
│ ├── Pagination.js
│ └── RenderPlugin.js
├── Template.js
├── TemplateBehavior.js
├── TemplateCollection.js
├── TemplateConfig.js
├── TemplateContent.js
├── TemplateFileSlug.js
├── TemplateGlob.js
├── TemplateLayout.js
├── TemplateLayoutPathResolver.js
├── TemplateMap.js
├── TemplatePassthrough.js
├── TemplatePassthroughManager.js
├── TemplatePermalink.js
├── TemplateRender.js
├── TemplateWriter.js
├── UserConfig.js
├── Util
│ ├── ArrayUtil.js
│ ├── AsyncEventEmitter.js
│ ├── Compatibility.js
│ ├── ConsoleLogger.js
│ ├── DateGitFirstAdded.js
│ ├── DateGitLastUpdated.js
│ ├── DateParse.js
│ ├── DirContains.js
│ ├── EsmResolver.js
│ ├── EsmResolverPortAdapter.core.js
│ ├── EsmResolverPortAdapter.js
│ ├── EventBusUtil.js
│ ├── ExistsCache.js
│ ├── FilePathUtil.js
│ ├── FileSize.js
│ ├── FileSystemManager.js
│ ├── GetJavaScriptData.js
│ ├── GlobMatcher.client.js
│ ├── GlobMatcher.js
│ ├── GlobRemap.js
│ ├── GlobStripper.js
│ ├── HtmlRelativeCopy.js
│ ├── HtmlTransformer.js
│ ├── ImportJsonSync.js
│ ├── IsAsyncFunction.js
│ ├── JavaScriptDependencies.core.js
│ ├── JavaScriptDependencies.js
│ ├── MemoizeFunction.js
│ ├── NewLineAdapter.core.js
│ ├── NewLineAdapter.js
│ ├── Objects
│ │ ├── DeepFreeze.js
│ │ ├── ObjectFilter.js
│ │ ├── ProxyWrap.js
│ │ ├── SampleModule.mjs
│ │ ├── Sortable.js
│ │ └── Unique.js
│ ├── PassthroughCopyBehaviorCheck.js
│ ├── PathNormalizer.js
│ ├── PathPrefixer.js
│ ├── Pluralize.js
│ ├── ProjectDirectories.js
│ ├── ProjectTemplateFormats.js
│ ├── PromiseUtil.js
│ ├── Require.js
│ ├── RequireUtils.core.js
│ ├── RequireUtils.js
│ ├── ReservedData.js
│ ├── ResolvePlugin.client.js
│ ├── ResolvePlugin.js
│ ├── RetrieveGlobals.client.js
│ ├── RetrieveGlobals.core.js
│ ├── RetrieveGlobals.js
│ ├── SemverCoerce.js
│ ├── SetUnion.js
│ ├── TemplateDepGraph.js
│ ├── TransformsUtil.js
│ ├── ValidUrl.js
│ ├── importer.client.js
│ ├── importer.core.js
│ ├── importer.js
│ ├── spawn.core.js
│ └── spawn.js
├── Watch.js
├── WatchQueue.js
├── WatchTargets.js
├── defaultConfig.js
├── defaultConfigExtended.client.js
└── defaultConfigExtended.js
├── test
├── ArrayUtilTest.js
├── BenchmarkTest.js
├── BundlePluginTest.js
├── CompatibilityTest.js
├── ComputedDataProxyTest.js
├── ComputedDataQueueTest.js
├── ComputedDataTemplateStringTest.js
├── ComputedDataTest.js
├── ConsoleLoggerTest.js
├── DependencyGraphTest.js
├── DirContainsTest.js
├── EleventyAddGlobalDataTest.js
├── EleventyErrorHandlerTest.js
├── EleventyErrorUtilTest.js
├── EleventyExtensionMapTest.js
├── EleventyFilesGitIgnoreEleventyIgnoreTest.js
├── EleventyFilesTest.js
├── EleventyImgTransformTest.js
├── EleventyServeTest.js
├── EleventyTest-CustomDateParsing.js
├── EleventyTest-Preprocessors.js
├── EleventyTest-Shortcodes.js
├── EleventyTest.js
├── EleventyVirtualTemplatesTest.js
├── ExistsCacheTest.js
├── FileSystemSearchTest.js
├── GetCollectionItemIndexTest.js
├── GetCollectionItemTest.js
├── GlobRemapTest.js
├── GlobStripperTest.js
├── GlobalDependencyMapTest.js
├── HtmlBasePluginTest.js
├── HtmlRelativeCopyTest.js
├── I18nPluginTest.js
├── IdAttributePluginTest.js
├── ImportJsonSyncTest.js
├── InputPathToUrlPluginTest.js
├── Issue3467Test.js
├── Issue3788Test.js
├── Issue3797Test.js
├── Issue3808Test.js
├── Issue3809Test.js
├── Issue3816Test.js
├── Issue3818Test.js
├── Issue3823Test.js
├── Issue3825Test.js
├── Issue3831Test.js
├── Issue3833Test.js
├── Issue3850Test.js
├── Issue3853Test.js
├── Issue3854Test.js
├── Issue3860Test.js
├── Issue3870IncrementalTest.js
├── Issue3870Test.js
├── Issue3875Test.js
├── Issue434Test.js
├── Issue775Test.js
├── JavaScriptDependenciesTest.js
├── JavaScriptFrontMatterTest.js
├── LayoutCacheTest.js
├── LodashTest.js
├── PaginationTest.js
├── PassthroughCopyBehaviorTest.js
├── PathNormalizerTest.js
├── PathPrefixer.js
├── PluralizeTest.js
├── ProjectDirectoriesTest.js
├── ProjectTemplateFormatsTest.js
├── ProxyWrapTest.js
├── ReservedDataTest.js
├── SemverCheckTest.js
├── SortableTest.js
├── TemplateCollectionTest.js
├── TemplateConfigTest.js
├── TemplateDataTest.js
├── TemplateDepGraphTest.js
├── TemplateEngineManagerTest.js
├── TemplateEngineTest.js
├── TemplateFileSlugTest.js
├── TemplateGlobTest.js
├── TemplateLayoutPathResolverTest.js
├── TemplateLayoutTest.js
├── TemplateMapTest-ComputedData.js
├── TemplateMapTest.js
├── TemplatePassthroughManagerTest.js
├── TemplatePassthroughTest.js
├── TemplatePermalinkTest.js
├── TemplateRenderCustomTest.js
├── TemplateRenderHTMLTest.js
├── TemplateRenderJavaScriptTest.js
├── TemplateRenderLiquidTest.js
├── TemplateRenderMarkdownPluginTest.js
├── TemplateRenderMarkdownTest.js
├── TemplateRenderNunjucksTest.js
├── TemplateRenderPluginTest.js
├── TemplateRenderTest.js
├── TemplateTest-CompileOptions.js
├── TemplateTest-ComputedData.js
├── TemplateTest-CustomExtensions.js
├── TemplateTest-DataCascade.js
├── TemplateTest-Dates.js
├── TemplateTest-JavaScript.js
├── TemplateTest.js
├── TemplateTest_Permalink.js
├── TemplateWriterTest.js
├── TestUtilityTest.js
├── TransformsUtilTest.js
├── UrlTest.js
├── UserConfigTest.js
├── UserDataExtensionsTest.js
├── Util
│ ├── normalizeNewLines.js
│ └── normalizeSeparators.js
├── UtilSetUnionTest.js
├── WatchQueueTest.js
├── WatchTargetsTest.js
├── _getNewTemplateForTests.js
├── _getRenderedTemplates.js
├── _issues
│ ├── 975
│ │ ├── 975-test.js
│ │ ├── another-post.md
│ │ ├── index.md
│ │ └── post.md
│ ├── 2250
│ │ ├── 2250-test.js
│ │ ├── javascript.11ty.cjs
│ │ ├── liquid.liquid
│ │ └── nunjucks.njk
│ ├── 3697
│ │ ├── 3697-test.js
│ │ └── _data
│ │ │ └── folder
│ │ │ ├── 0.json
│ │ │ └── 3.json
│ ├── 3809
│ │ ├── .app
│ │ │ ├── .eleventy.js
│ │ │ └── _data
│ │ │ │ └── app.json
│ │ └── index.njk
│ ├── 3853
│ │ └── deeper
│ │ │ └── index.njk
│ └── 3854
│ │ ├── app
│ │ ├── .eleventy.js
│ │ └── index.njk
│ │ └── index.njk
├── _testHelpers.js
├── cmdTest.js
├── file-system-search
│ └── file.txt
├── noop
│ └── .gitkeep
├── noop2
│ └── .gitkeep
├── proxy-pagination-globaldata
│ ├── _data
│ │ └── banner.js
│ ├── tmpl.liquid
│ ├── tmpl2.njk
│ └── tmpl4.11ty.js
├── semverCoerceTest.js
├── slugify-filter
│ ├── comma.njk
│ ├── multibyte.njk
│ ├── slug-number.njk
│ ├── slug-options.njk
│ ├── slugify-number.njk
│ ├── slugify-options.njk
│ └── test.njk
├── stubs--to
│ ├── test.md
│ └── test2.liquid
├── stubs-1206
│ ├── page1.njk
│ └── page2.njk
├── stubs-1242
│ ├── _data
│ │ ├── xyz.dottest.json
│ │ └── xyz.dottest
│ │ │ └── test.json
│ └── empty.md
├── stubs-1325
│ ├── test.11ty.js
│ └── test.js
├── stubs-142
│ └── index.njk
├── stubs-1691
│ ├── _data
│ │ └── str.txt
│ ├── template.11tydata.txt
│ └── template.njk
├── stubs-2145
│ ├── _includes
│ │ └── layout.njk
│ └── test.njk
├── stubs-2167
│ └── paginated.njk
├── stubs-2224
│ └── index.njk
├── stubs-2258-2830-skip-layouts
│ ├── _includes
│ │ └── layout.njk
│ ├── eleventy.config.cjs
│ └── style.scss
├── stubs-2258
│ ├── _includes
│ │ ├── _code.scss
│ │ └── layout.njk
│ ├── eleventy.config.cjs
│ └── style.scss
├── stubs-2367
│ ├── _includes
│ │ └── layout.liquid
│ ├── templateWithLiquidShortcodeMultipleArguments-template2.liquid
│ └── templateWithLiquidShortcodeMultipleArguments.liquid
├── stubs-2378
│ └── _data
│ │ └── images
│ │ ├── dog.jpg
│ │ └── dogpng.png
├── stubs-2602
│ └── index.njk
├── stubs-2753
│ ├── _data
│ │ └── global.js
│ ├── page1.njk
│ └── page2.njk
├── stubs-2790
│ └── page.11ty.cjs
├── stubs-2851
│ ├── content.njk
│ └── paginated.njk
├── stubs-3013
│ ├── html
│ │ ├── _data
│ │ │ └── books.json
│ │ ├── _includes
│ │ │ └── base.html
│ │ └── book.html
│ ├── liquid
│ │ ├── _data
│ │ │ └── books.json
│ │ ├── _includes
│ │ │ └── base.liquid
│ │ └── book.liquid
│ ├── md
│ │ ├── _data
│ │ │ └── books.json
│ │ ├── _includes
│ │ │ └── base.md
│ │ └── book.md
│ └── njk
│ │ ├── _data
│ │ └── books.json
│ │ ├── _includes
│ │ └── base.njk
│ │ └── book.njk
├── stubs-3285
│ └── src
│ │ └── scripts
│ │ └── hello-world.js
├── stubs-337
│ ├── data
│ │ └── xyz.json
│ └── src
│ │ └── empty.md
├── stubs-3807
│ ├── Issue3807test.js
│ ├── _layouts
│ │ ├── base.html
│ │ └── home.html
│ ├── eleventy.config.js
│ └── index.md
├── stubs-3810
│ ├── _includes
│ │ └── promo.njk
│ ├── eleventy.config.js
│ └── index.md
├── stubs-403
│ ├── .eleventyignore
│ ├── _includes
│ │ └── include.liquid
│ └── template.liquid
├── stubs-408-sass
│ ├── _code.scss
│ └── style.scss
├── stubs-413
│ └── date-frontmatter.md
├── stubs-434
│ └── _includes
│ │ ├── macros-filter.njk
│ │ └── macros.njk
├── stubs-475
│ ├── _includes
│ │ └── layout.njk
│ └── transform-layout
│ │ └── transform-layout.njk
├── stubs-630
│ ├── _data
│ │ ├── globalData0.cjs
│ │ ├── globalData1.cjs
│ │ ├── globalData2.json
│ │ ├── globalData3.yaml
│ │ ├── globalData4.nosj
│ │ ├── mergingGlobalData.cjs
│ │ ├── mergingGlobalData.js
│ │ ├── mergingGlobalData.json
│ │ ├── mergingGlobalData.nosj
│ │ ├── mergingGlobalData.yaml
│ │ └── subdir
│ │ │ └── globalDataSubdir.yaml
│ └── component-yaml
│ │ ├── component.11tydata.cjs
│ │ ├── component.11tydata.json
│ │ ├── component.11tydata.nosj
│ │ ├── component.11tydata.yaml
│ │ ├── component.json
│ │ ├── component.njk
│ │ └── component.yaml
├── stubs-670
│ ├── content.njk
│ └── index.njk
├── stubs-919
│ ├── test.11tydata.cjs
│ ├── test.njk
│ └── test2.njk
├── stubs-absolute
│ └── test.md
├── stubs-addglobaldata-noop
│ └── test.txt
├── stubs-addglobaldata
│ └── test.liquid
├── stubs-autocopy
│ ├── .gitkeep
│ ├── possum.jpg
│ └── possum.png
├── stubs-base-case-sens
│ └── index.njk
├── stubs-base
│ └── index.njk
├── stubs-circular-layout
│ └── _includes
│ │ ├── layout-cycle-a.njk
│ │ ├── layout-cycle-b.njk
│ │ ├── layout-cycle-c.njk
│ │ └── layout-cycle-self.njk
├── stubs-computed-array
│ └── test.liquid
├── stubs-computed-collections-filter
│ ├── collections.njk
│ └── dog.njk
├── stubs-computed-collections
│ ├── collections.njk
│ └── dog.njk
├── stubs-computed-dirdata
│ └── dir
│ │ ├── dir.11tydata.cjs
│ │ ├── first.11ty.cjs
│ │ └── second.11ty.cjs
├── stubs-computed-global
│ ├── _data
│ │ └── eleventyComputed.cjs
│ └── intermix.njk
├── stubs-computed-pagination
│ ├── child.11ty.cjs
│ └── paginated.njk
├── stubs-computed-symbolparse
│ ├── test.liquid
│ └── test.njk
├── stubs-custom-extension
│ └── test.js1
├── stubs-data-cascade
│ ├── global-versus-layout
│ │ ├── _data
│ │ │ └── cascade.cjs
│ │ ├── _includes
│ │ │ └── base.njk
│ │ └── test.njk
│ ├── layout-data-files
│ │ ├── _includes
│ │ │ └── base.njk
│ │ ├── test.11tydata.cjs
│ │ └── test.njk
│ ├── layout-versus-dirdatafile
│ │ └── src
│ │ │ ├── _includes
│ │ │ └── base.njk
│ │ │ ├── src.11tydata.cjs
│ │ │ └── test.njk
│ └── layout-versus-tmpldatafile
│ │ ├── _includes
│ │ └── base.njk
│ │ ├── test.11tydata.cjs
│ │ └── test.njk
├── stubs-data-esm
│ └── _data
│ │ ├── commonjs.cjs
│ │ └── module.mjs
├── stubs-dependency-tree
│ ├── child.cjs
│ ├── grandchild.cjs
│ └── index.cjs
├── stubs-empty-json-data
│ └── _data
│ │ └── empty.json
├── stubs-empty
│ └── .gitkeep
├── stubs-fancyjs
│ ├── test.11ty.tsx
│ └── test.mdx
├── stubs-global-data-config-api-nested
│ └── _data
│ │ └── deep.cjs
├── stubs-global-data-config-api
│ └── empty.txt
├── stubs-i18n
│ ├── en-us
│ │ └── index.11ty.cjs
│ ├── en
│ │ └── index.liquid
│ ├── es
│ │ └── index.njk
│ └── non-lang-file.njk
├── stubs-img-transform
│ ├── ignored.md
│ ├── missing-alt.md
│ ├── multiple.md
│ ├── possum.png
│ └── single.md
├── stubs-incremental
│ └── layout-chain
│ │ ├── _includes
│ │ ├── base.njk
│ │ └── parent.njk
│ │ └── test.njk
├── stubs-layout-cache
│ ├── _includes
│ │ ├── layout.liquid
│ │ └── layout.njk
│ ├── test.liquid
│ └── test.njk
├── stubs-layouts-event
│ ├── _includes
│ │ ├── first.liquid
│ │ ├── second.liquid
│ │ └── third.liquid
│ └── page.md
├── stubs-njk-async
│ └── _includes
│ │ └── loop.njk
├── stubs-pagination-computed-quotes-njk
│ ├── post.njk
│ └── test.njk
├── stubs-pagination-computed-quotes
│ ├── post.liquid
│ └── test.liquid
├── stubs-pathtourl
│ ├── css.njk
│ ├── filter.njk
│ ├── tmpl.njk
│ └── transform.njk
├── stubs-render-plugin
│ ├── 11tyjs-file-override.njk
│ ├── 11tyjs-file.njk
│ ├── 11tyjs.liquid
│ ├── _includes
│ │ ├── frontmatter.liquid
│ │ ├── include-js.txt
│ │ ├── include.11ty.cjs
│ │ ├── include.liquid
│ │ └── include.njk
│ ├── bad-data.njk
│ ├── capture-liquid.njk
│ ├── capture-njk.liquid
│ ├── data-no-templatelang.liquid
│ ├── false.liquid
│ ├── liquid-direct.njk
│ ├── liquid-eleventy.njk
│ ├── liquid-global.njk
│ ├── liquid-md.11ty.cjs
│ ├── liquid-md.liquid
│ ├── liquid-page.liquid
│ ├── liquid-page.njk
│ ├── liquid.njk
│ ├── md.liquid
│ ├── njk-eleventy.liquid
│ ├── njk-file-not-exist.liquid
│ ├── njk-file.liquid
│ ├── njk-file.njk
│ ├── njk-page.liquid
│ ├── nunjucks-frontmatter.njk
│ ├── nunjucks-global.liquid
│ ├── nunjucks.11ty.cjs
│ ├── nunjucks.liquid
│ ├── using-frontmatter.liquid
│ └── vue.liquid
├── stubs-virtual-nowrite
│ └── .gitkeep
├── stubs-virtual
│ ├── .gitkeep
│ └── eleventy.config.js
├── stubs
│ ├── .eleventyignore
│ ├── 2016-02-01-permalinkdate.liquid
│ ├── _data
│ │ ├── globalData.json
│ │ ├── globalData2.cjs
│ │ ├── globalDataFn.js
│ │ ├── globalDataFnCJS.cjs
│ │ ├── subdir
│ │ │ └── testDataSubdir.json
│ │ ├── testData.json
│ │ └── testDataLiquid.json
│ ├── _includes
│ │ ├── base.njk
│ │ ├── custom-filter.liquid
│ │ ├── default.liquid
│ │ ├── defaultLayout.liquid
│ │ ├── defaultLayoutLayoutContent.liquid
│ │ ├── imports.njk
│ │ ├── included-data.html
│ │ ├── included-relative.njk
│ │ ├── included.html
│ │ ├── included.liquid
│ │ ├── included.njk
│ │ ├── included.nunj
│ │ ├── layout-a.liquid
│ │ ├── layout-b.liquid
│ │ ├── layoutLiquid.liquid
│ │ ├── layouts
│ │ │ ├── div-wrapper-layout.njk
│ │ │ ├── engineOverrides.njk
│ │ │ ├── engineOverridesMd.njk
│ │ │ ├── inasubdir.njk
│ │ │ ├── issue-115.liquid
│ │ │ ├── layout-contentdump.njk
│ │ │ ├── layout-inherit-a.njk
│ │ │ ├── layout-inherit-b.njk
│ │ │ ├── layout-inherit-c.njk
│ │ │ ├── post.liquid
│ │ │ └── templateMapCollection.njk
│ │ ├── multiple.liquid
│ │ ├── multiple.md
│ │ ├── mylocallayout.njk
│ │ ├── permalink-data-layout.njk
│ │ ├── permalink-in-layout
│ │ │ ├── layout-fileslug.liquid
│ │ │ └── layout.liquid
│ │ ├── scopeleak.liquid
│ │ ├── subfolder
│ │ │ ├── included.html
│ │ │ ├── included.liquid
│ │ │ └── included.nunj
│ │ └── test.js
│ ├── _layouts
│ │ └── layoutsdefault.liquid
│ ├── add-extension
│ │ ├── test.njk
│ │ └── test.txt
│ ├── broken-config.cjs
│ ├── buffer.11ty.cjs
│ ├── cfg-directories-export-cjs
│ │ ├── eleventy.config.cjs
│ │ └── src
│ │ │ └── .gitkeep
│ ├── cfg-directories-export
│ │ ├── eleventy.config.js
│ │ └── src
│ │ │ └── .gitkeep
│ ├── class-async-data-fn.11ty.cjs
│ ├── class-async-filter.11ty.cjs
│ ├── class-async.11ty.cjs
│ ├── class-buffer.11ty.cjs
│ ├── class-data-filter.11ty.cjs
│ ├── class-data-fn-filter.11ty.cjs
│ ├── class-data-fn-shorthand.11ty.cjs
│ ├── class-data-fn.11ty.cjs
│ ├── class-data-permalink-async-fn.11ty.cjs
│ ├── class-data-permalink-buffer.11ty.cjs
│ ├── class-data-permalink-fn-buffer.11ty.cjs
│ ├── class-data-permalink-fn-filter.11ty.cjs
│ ├── class-data-permalink-fn.11ty.cjs
│ ├── class-data-permalink.11ty.cjs
│ ├── class-data.11ty.cjs
│ ├── class-filter.11ty.cjs
│ ├── class-fns-has-page.11ty.cjs
│ ├── class-fns.11ty.cjs
│ ├── class-norender.11ty.cjs
│ ├── class-with-dep-upstream.js
│ ├── class-with-dep.11ty.cjs
│ ├── class.11ty.cjs
│ ├── classfields-data.11ty.cjs
│ ├── cmd-help-processing
│ │ └── _data
│ │ │ └── test.js
│ ├── collection-layout-wrap.njk
│ ├── collection-layout
│ │ ├── _includes
│ │ │ └── layout.liquid
│ │ ├── dog1.liquid
│ │ └── template.liquid
│ ├── collection-slug
│ │ ├── dog1.njk
│ │ └── template.njk
│ ├── collection-template
│ │ ├── _includes
│ │ │ └── layout.liquid
│ │ ├── dog1.liquid
│ │ └── template.liquid
│ ├── collection
│ │ ├── test1.md
│ │ ├── test10.md
│ │ ├── test2.md
│ │ ├── test3.md
│ │ ├── test4.md
│ │ ├── test5.md
│ │ ├── test6.html
│ │ ├── test7.njk
│ │ ├── test8.md
│ │ └── test9.md
│ ├── collection2
│ │ ├── test1.md
│ │ └── test2.md
│ ├── component-async
│ │ ├── component.11tydata.cjs
│ │ ├── component.11tydata.js
│ │ └── component.njk
│ ├── component
│ │ ├── component.11tydata.cjs
│ │ ├── component.11tydata.js
│ │ ├── component.11tydata.json
│ │ ├── component.json
│ │ └── component.njk
│ ├── config-deps-upstream.cjs
│ ├── config-deps.cjs
│ ├── config-empty-pathprefix.cjs
│ ├── config-promise.js
│ ├── config.cjs
│ ├── custom-extension-no-permalink.txt
│ ├── custom-extension.txt
│ ├── custom-frontmatter
│ │ ├── template-excerpt-comment.njk
│ │ ├── template-newline1.njk
│ │ ├── template-newline2.njk
│ │ ├── template-newline3.njk
│ │ ├── template-nonewline.njk
│ │ ├── template-toml.njk
│ │ └── template.njk
│ ├── data-cascade
│ │ ├── template.11tydata.cjs
│ │ └── template.njk
│ ├── datafiledoesnotexist
│ │ └── template.njk
│ ├── dates
│ │ ├── 2018-01-01-file5.md
│ │ ├── 2019-01-01-folder
│ │ │ └── 2020-01-01-file.md
│ │ ├── file1.md
│ │ ├── file2.md
│ │ ├── file2b.md
│ │ ├── file3.md
│ │ └── file4.md
│ ├── default-class-export-and-others.11ty.js
│ ├── default-export-and-others.11ty.js
│ ├── default-frontmatter.txt
│ ├── default-function-export-and-named-data.11ty.cjs
│ ├── default-function-export-and-named-data.11ty.js
│ ├── default-no-liquid.md
│ ├── default.liquid
│ ├── default.md
│ ├── dependencies
│ │ ├── dep1.cjs
│ │ ├── dep2.cjs
│ │ └── two-deps.11ty.cjs
│ ├── deps
│ │ ├── dep1.cjs
│ │ └── dep2.cjs
│ ├── dynamic-permalink
│ │ └── test.njk
│ ├── eleventyComputed
│ │ ├── first.njk
│ │ ├── override-reuse.njk
│ │ ├── override.njk
│ │ ├── permalink-simple.njk
│ │ ├── permalink-slug.njk
│ │ ├── permalink.njk
│ │ ├── second.njk
│ │ ├── third.njk
│ │ ├── true.njk
│ │ └── use-global-data.njk
│ ├── eleventyExcludeFromCollections.njk
│ ├── eleventyExcludeFromCollectionsPermalinkFalse.njk
│ ├── engine-singletons
│ │ ├── first.njk
│ │ └── second.njk
│ ├── exitCode
│ │ └── failure.njk
│ ├── exitCode_globalData
│ │ ├── _data
│ │ │ └── test.js
│ │ └── test.liquid
│ ├── exitCode_success
│ │ └── success.njk
│ ├── exports-flatdata.11ty.cjs
│ ├── fileslug.11ty.cjs
│ ├── firstdir
│ │ └── seconddir
│ │ │ └── component.njk
│ ├── formatTest.liquid
│ ├── frontmatter-date
│ │ ├── test.liquid
│ │ └── test.njk
│ ├── function-arrow.11ty.cjs
│ ├── function-async-filter.11ty.cjs
│ ├── function-async.11ty.cjs
│ ├── function-buffer.11ty.cjs
│ ├── function-filter.11ty.cjs
│ ├── function-fns.11ty.cjs
│ ├── function-markdown.11ty.cjs
│ ├── function-prototype.11ty.cjs
│ ├── function-throws-async.11ty.cjs
│ ├── function-throws.11ty.cjs
│ ├── function.11ty.cjs
│ ├── glob-pages
│ │ ├── about.md
│ │ ├── contact.md
│ │ └── home.md
│ ├── global-dash-variable.liquid
│ ├── globby
│ │ ├── _includes
│ │ │ └── include.html
│ │ └── test.html
│ ├── ignore-dedupe
│ │ └── .gitignore
│ ├── ignore1
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignore2
│ │ ├── .gitignore
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignore3
│ │ ├── .eleventyignore
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignore4
│ │ ├── .eleventyignore
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignore5
│ │ ├── .gitignore
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignore6
│ │ ├── .eleventyignore
│ │ ├── .gitignore
│ │ └── ignoredFolder
│ │ │ └── ignored.md
│ ├── ignoredFolder
│ │ └── ignored.md
│ ├── ignorelocalroot
│ │ └── .eleventyignore
│ ├── ignorelocalrootgitignore
│ │ ├── .eleventyignore
│ │ └── .gitignore
│ ├── img
│ │ └── stub.md
│ ├── included.liquid
│ ├── includer.liquid
│ ├── includesemptystring.liquid
│ ├── index.html
│ ├── index.liquid
│ ├── issue-115
│ │ ├── index-with-layout.liquid
│ │ ├── index.liquid
│ │ ├── template-bars.liquid
│ │ └── template-foos.liquid
│ ├── issue-135
│ │ ├── template.json
│ │ └── template.njk
│ ├── issue-522
│ │ ├── excluded.md
│ │ └── template.md
│ ├── issue-95
│ │ ├── cat.md
│ │ └── notacat.md
│ ├── layout-permalink-difflang
│ │ ├── _includes
│ │ │ └── test.njk
│ │ └── test.md
│ ├── layoutsemptystring.liquid
│ ├── local-data-tags
│ │ ├── component.11tydata.cjs
│ │ └── component.njk
│ ├── multiple-ignores
│ │ ├── .eleventyignore
│ │ ├── ignoredFolder
│ │ │ └── ignored.md
│ │ └── subfolder
│ │ │ ├── .eleventyignore
│ │ │ └── ignoredFolder2
│ │ │ └── ignored2.md
│ ├── multipleexports-promises.11ty.cjs
│ ├── multipleexports.11ty.cjs
│ ├── njk-relative
│ │ └── dir
│ │ │ ├── base.njk
│ │ │ ├── imports.njk
│ │ │ ├── included.njk
│ │ │ └── unique-include-123.njk
│ ├── object-norender.11ty.cjs
│ ├── object.11ty.cjs
│ ├── oneinstance.11ty.cjs
│ ├── overrides
│ │ ├── layout.njk
│ │ ├── layoutfalse.njk
│ │ ├── page-templatesyntax.md
│ │ ├── test-bypass.md
│ │ ├── test-empty.html
│ │ ├── test-empty.md
│ │ ├── test-error.njk
│ │ ├── test-md.liquid
│ │ ├── test-multiple.md
│ │ ├── test-multiple2.njk
│ │ ├── test-njk.liquid
│ │ ├── test.html
│ │ ├── test.liquid
│ │ └── test.md
│ ├── page-target-collections
│ │ ├── paginateall.njk
│ │ ├── tagpages.njk
│ │ └── tagpagesall.njk
│ ├── paged-global-data-mutable
│ │ ├── _data
│ │ │ └── testdata.cjs
│ │ └── paged-differing-data-set.njk
│ ├── paged
│ │ ├── cfg-collection-tag-cfg-collection
│ │ │ ├── consumer.njk
│ │ │ ├── paged-downstream.njk
│ │ │ ├── paged-main.njk
│ │ │ ├── test1.njk
│ │ │ ├── test2.njk
│ │ │ └── test3.njk
│ │ ├── collection-apply-to-all
│ │ │ ├── consumer.njk
│ │ │ ├── main.njk
│ │ │ ├── test1.njk
│ │ │ ├── test2.njk
│ │ │ └── test3.njk
│ │ ├── collection
│ │ │ ├── consumer.njk
│ │ │ ├── main.njk
│ │ │ ├── test1.njk
│ │ │ ├── test2.njk
│ │ │ └── test3.njk
│ │ ├── notpaged.njk
│ │ ├── paged-before-and-reverse.njk
│ │ ├── paged-before-filter.njk
│ │ ├── paged-before-metadata.njk
│ │ ├── paged-before.njk
│ │ ├── paged-empty-pageonemptydata.njk
│ │ ├── paged-empty.njk
│ │ ├── paged.json
│ │ ├── paged.njk
│ │ ├── pagedalias.njk
│ │ ├── pagedaliassize2.njk
│ │ ├── pagedinlinedata-reverse.njk
│ │ ├── pagedinlinedata.njk
│ │ ├── pagedobject.njk
│ │ ├── pagedobjectfilterarray.njk
│ │ ├── pagedobjectfilterstring.njk
│ │ ├── pagedobjectvalues.njk
│ │ ├── pagedpermalink.njk
│ │ ├── pagedpermalinkif.liquid
│ │ ├── pagedpermalinkif.njk
│ │ ├── pagedpermalinknumeric.njk
│ │ ├── pagedpermalinknumericoneindexed.njk
│ │ └── pagedresolve.njk
│ ├── pagedate.liquid
│ ├── pagedate.njk
│ ├── pagedateutc.njk
│ ├── pagination-eleventycomputed-permalink.liquid
│ ├── pagination-eleventycomputed-title.liquid
│ ├── pagination-templatecontent
│ │ ├── index.njk
│ │ ├── post-1.md
│ │ └── post-2.md
│ ├── permalink-build
│ │ └── permalink-build.md
│ ├── permalink-conflicts-false
│ │ ├── test1.md
│ │ └── test2.md
│ ├── permalink-conflicts
│ │ ├── test1.md
│ │ ├── test2.md
│ │ └── test3.md
│ ├── permalink-data-layout
│ │ ├── test.json
│ │ └── test.njk
│ ├── permalink-empty-object
│ │ └── empty-object.md
│ ├── permalink-false-computed
│ │ └── test.md
│ ├── permalink-false
│ │ └── test.md
│ ├── permalink-in-layout-fileslug.liquid
│ ├── permalink-in-layout.liquid
│ ├── permalink-markdown-override.md
│ ├── permalink-markdown-var.md
│ ├── permalink-markdown.md
│ ├── permalink-nobuild
│ │ └── permalink-nobuild.md
│ ├── permalink-true
│ │ └── permalink-true.md
│ ├── permalinkdata-jsfn.njk
│ ├── permalinkdata-jspermalinkfn.njk
│ ├── permalinkdata.njk
│ ├── permalinkdate.liquid
│ ├── permalinked.liquid
│ ├── posts
│ │ ├── post1.njk
│ │ ├── posts.json
│ │ └── posts.njk
│ ├── prematureTemplateContent
│ │ ├── test.11ty.cjs
│ │ ├── test.liquid
│ │ ├── test.md
│ │ └── test.njk
│ ├── promise.11ty.cjs
│ ├── public
│ │ └── test.css
│ ├── relative-liquid
│ │ └── dir
│ │ │ └── included.liquid
│ ├── reuse-permalink
│ │ ├── reuse-permalink.json
│ │ └── test1.liquid
│ ├── script-frontmatter
│ │ ├── test-default.njk
│ │ ├── test-js.njk
│ │ └── test.njk
│ ├── string.11ty.cjs
│ ├── string.11ty.custom
│ ├── string.11ty.possum
│ ├── stubs-computed-permalink
│ │ ├── eleventycomputed-nested-object.11ty.cjs
│ │ ├── eleventycomputed-object-replace.11ty.cjs
│ │ └── eleventycomputed-object.11ty.cjs
│ ├── stubs-virtual-conflict
│ │ └── virtual.md
│ ├── subdir
│ │ ├── img
│ │ │ └── .gitkeep
│ │ └── index.html
│ ├── subfolder
│ │ ├── index.html
│ │ ├── subfolder.liquid
│ │ └── subfolder
│ │ │ └── subfolder.liquid
│ ├── tagged-pagination-multiples-layout
│ │ └── test.njk
│ ├── tagged-pagination-multiples
│ │ └── test.njk
│ ├── template-passthrough-duplicates
│ │ └── input
│ │ │ ├── avatar.png
│ │ │ └── src
│ │ │ └── views
│ │ │ └── avatar.png
│ ├── template-passthrough
│ │ ├── .htaccess
│ │ ├── img.jpg
│ │ ├── src
│ │ │ └── views
│ │ │ │ └── avatar.png
│ │ └── static
│ │ │ ├── nested
│ │ │ └── test-nested.css
│ │ │ ├── test.css
│ │ │ └── test.js
│ ├── template-passthrough2
│ │ ├── .htaccess
│ │ ├── img.jpg
│ │ ├── src
│ │ │ └── views
│ │ │ │ └── avatar.png
│ │ └── static
│ │ │ ├── nested
│ │ │ └── test-nested.css
│ │ │ ├── test.css
│ │ │ └── test.js
│ ├── template.liquid
│ ├── templateFrontMatter.liquid
│ ├── templateFrontMatterJs.njk
│ ├── templateFrontMatterJson.liquid
│ ├── templateLayoutCacheDuplicates-b
│ │ └── _includes
│ │ │ └── layout.njk
│ ├── templateLayoutCacheDuplicates
│ │ └── _includes
│ │ │ └── layout.njk
│ ├── templateMapCollection
│ │ ├── paged-cfg-permalink.md
│ │ ├── paged-cfg-tagged-apply-to-all.md
│ │ ├── paged-cfg-tagged-permalink-apply-to-all.md
│ │ ├── paged-cfg-tagged-permalink.md
│ │ ├── paged-cfg-tagged.md
│ │ ├── paged-cfg.md
│ │ ├── paged-tag-dogs-templateContent-alias.md
│ │ ├── paged-tag-dogs-templateContent.md
│ │ ├── paged-tag.md
│ │ ├── templateContent.md
│ │ ├── test1.md
│ │ ├── test2.md
│ │ ├── test3.md
│ │ ├── test4.md
│ │ ├── test5.md
│ │ └── testWithLayout.md
│ ├── templateTwoLayouts.liquid
│ ├── templateWithLayout.liquid
│ ├── templateWithLayoutContent.liquid
│ ├── templateWithLayoutKey.liquid
│ ├── templatetest-frontmatter
│ │ ├── multiple.njk
│ │ └── single.njk
│ ├── test-override-js-markdown.11ty.cjs
│ ├── testing.html
│ ├── transform-pages
│ │ └── template.njk
│ ├── use-collection.11ty.cjs
│ ├── vue-layout.11ty.cjs
│ ├── vue.11ty.cjs
│ ├── writeTest
│ │ └── test.md
│ ├── writeTestJS-casesensitive
│ │ ├── sample.Js
│ │ └── test.11Ty.js
│ ├── writeTestJS-passthrough
│ │ ├── sample.js
│ │ └── test.11ty.js
│ ├── writeTestJS
│ │ ├── sample.cjs
│ │ └── test.11ty.cjs
│ └── writeTestMarkdown
│ │ ├── sample.md
│ │ └── sample2.markdown
└── views
│ └── .gitkeep
├── test_node
├── 3824
│ ├── 3824-test.js
│ ├── _includes
│ │ ├── head.tsx
│ │ └── view-props.tsx
│ ├── eleventy.config.js
│ ├── index.11ty.tsx
│ └── tsconfig-3824.json
├── 3824-incremental
│ ├── 3824-incremental-test.js
│ ├── _includes
│ │ ├── head.tsx
│ │ └── view-props.tsx
│ ├── eleventy.config.js
│ ├── index.11ty.tsx
│ └── tsconfig-3824.json
├── JsxTest.js
├── MdxTest.js
├── README.md
└── tests.js
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | end_of_line = lf
6 | insert_final_newline = true
7 | trim_trailing_whitespace = true
8 | charset = utf-8
9 |
10 | [*.yml]
11 | indent_style = space
12 |
13 | [/test/**/*]
14 | indent_style = space
15 |
16 | [/test/stubs*/**]
17 | insert_final_newline = false
18 | trim_trailing_whitespace = false
19 |
--------------------------------------------------------------------------------
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | # Switch the entire codebase to tabs, for accessibility #3098
2 | 358ec48f779fa34e14abef057cc1fa0c1a10aa45
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2 | * @zachleat
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | contact_links:
2 | - name: I have a question about Eleventy
3 | url: https://github.com/11ty/eleventy/discussions/
4 | about: General education topics should be filed on our Discussions board e.g. “How do I do this in Eleventy?” or “Can Eleventy do this?”
5 | - name: Discord Community
6 | url: https://discord.gg/GBkBy9u
7 | about: Ask the community on Discord
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Documentation!
3 | about: A thing that Eleventy does needs to be documented better or is currently documented incorrectly!
4 | title: ""
5 | labels: documentation
6 | assignees: ""
7 | ---
8 |
--------------------------------------------------------------------------------
/.github/opencollective.yml:
--------------------------------------------------------------------------------
1 | collective: 11ty
2 | tiers:
3 | - tiers: '*'
4 | labels: ["oc-supporter"]
5 | message: "Hey , thanks for supporting us on Open Collective!"
6 | invitation: |
7 | Hey :wave:,
8 |
9 | Thank you for opening an issue. We will get back to you as soon as we can.
10 |
11 | Also, check out our [Open Collective](https://opencollective.com/11ty) and consider backing us—every little bit helps!
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated files
2 | dist/
3 | packages/*/visualize/*
4 |
5 | # Ignore installed npm modules
6 | node_modules/
7 |
8 | # Ignore build tool output, e.g. code coverage
9 | .nyc_output/
10 | coverage/
11 | docs/_data/coverage.json
12 |
13 | # Ignore API documentation
14 | api-docs/
15 |
16 | # Ignore folders from source code editors
17 | .vscode
18 | .idea
19 |
20 | # Ignore eleventy output when doing manual tests
21 | _site/
22 |
23 | # Ignore test files
24 | .cache
25 | test/stubs-layout-cache/_includes/*.js
26 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | docs
2 | docs-src
3 | test
4 | test_node
5 | coverage
6 | eslint.config.js
7 | .*
8 | packages/client/
9 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 22
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": false,
4 | "semi": true,
5 | "endOfLine": "lf",
6 | "arrowParens": "always",
7 | "printWidth": 100
8 | }
9 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Reporting a Vulnerability
4 |
5 | Privately report a security issue by navigating to https://github.com/11ty/eleventy/security and using the “Report a vulnerability” button.
6 |
7 | Read more at: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability
8 |
9 | Alternatively, you may report security issues via an email to `security@11ty.dev`.
10 |
--------------------------------------------------------------------------------
/docs/coverage.njk:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: coverage.md
3 | ---
4 | # Code Coverage for Eleventy v{{ pkg.version }}
5 |
6 | | Filename | % Lines | % Statements | % Functions | % Branches |
7 | | --- | --- | --- | --- | --- |
8 | {% for file, line in coverage -%}
9 | | `{{ file | removeDir }}` | {{ line.lines.pct }}% | {{ line.statements.pct }}% | {{ line.functions.pct }}% | {{ line.branches.pct }}% |
10 | {% endfor -%}
11 |
--------------------------------------------------------------------------------
/packages/client/src/BundleCore.js:
--------------------------------------------------------------------------------
1 | // see BundleEleventy.js for Core WITH bundled Eleventy core plugins
2 | import "./shims/shim-core.js";
3 |
4 | export { MinimalCore as Eleventy } from "../../../src/CoreMinimal.js";
5 |
--------------------------------------------------------------------------------
/packages/client/src/BundleI18nPlugin.js:
--------------------------------------------------------------------------------
1 | export { default as I18nPlugin } from "../../../src/Plugins/I18nPlugin.js";
2 |
--------------------------------------------------------------------------------
/packages/client/src/BundleLiquid.js:
--------------------------------------------------------------------------------
1 | export { default as Liquid } from "../../../src/Engines/Liquid.js";
2 |
--------------------------------------------------------------------------------
/packages/client/src/BundleMarkdown.js:
--------------------------------------------------------------------------------
1 | export { default as Markdown } from "../../../src/Engines/Markdown.js";
2 |
--------------------------------------------------------------------------------
/packages/client/src/BundleNunjucks.js:
--------------------------------------------------------------------------------
1 | export { default as Nunjucks } from "../../../src/Engines/Nunjucks.js";
2 |
--------------------------------------------------------------------------------
/packages/client/src/shims/shim-core.js:
--------------------------------------------------------------------------------
1 | import * as process from "./process.cjs";
2 |
3 | // `path` polyfill needs this
4 | window.process = globalThis.process = process;
5 |
6 | // `recursive-copy` needs this (not necessary for Core.js)
7 | window.global = globalThis || window;
8 |
9 | // @11ty/eleventy needs this
10 | class Buffer {
11 | static [Symbol.hasInstance](instance) {
12 | return this.isBuffer(instance);
13 | }
14 |
15 | static isBuffer() {
16 | return false;
17 | }
18 | }
19 |
20 | window.Buffer = globalThis.Buffer = Buffer;
21 |
--------------------------------------------------------------------------------
/packages/client/test/client-core.test.js:
--------------------------------------------------------------------------------
1 | import { Eleventy } from "../dist/eleventy.core.js";
2 | import sharedTests from "./shared-tests.js";
3 |
4 | sharedTests(Eleventy);
5 |
--------------------------------------------------------------------------------
/packages/client/test/client-eleventy.test.js:
--------------------------------------------------------------------------------
1 | import { Eleventy } from "../dist/eleventy.js";
2 | import sharedTests from "./shared-tests.js";
3 |
4 | sharedTests(Eleventy);
5 |
--------------------------------------------------------------------------------
/packages/client/vitest.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config";
2 | import os from "node:os";
3 |
4 | let instances = [{ browser: "chromium" }, { browser: "firefox" }];
5 |
6 | if (os.type() === "Darwin") {
7 | instances.push({ browser: "webkit" });
8 | }
9 |
10 | export default defineConfig({
11 | test: {
12 | browser: {
13 | enabled: true,
14 | headless: true,
15 | screenshotFailures: false,
16 | provider: "playwright",
17 | // https://vitest.dev/guide/browser/playwright
18 | instances,
19 | },
20 | },
21 | });
22 |
--------------------------------------------------------------------------------
/scripts/release-dryrun.sh:
--------------------------------------------------------------------------------
1 | export NPM_PUBLISH_TAG="canary"
2 | export DRY_RUN="--dry-run" # leave that space as-is
3 |
4 | echo "Running @11ty/eleventy and @11ty/client publish dry run test"
5 |
6 | ./scripts/release.sh
7 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Liquid.core.js:
--------------------------------------------------------------------------------
1 | // Must load dynamically in standard core
2 | export default undefined;
3 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Liquid.js:
--------------------------------------------------------------------------------
1 | export { default } from "../../Engines/Liquid.js";
2 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Markdown.core.js:
--------------------------------------------------------------------------------
1 | // Must load dynamically in standard core
2 | export default undefined;
3 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Markdown.js:
--------------------------------------------------------------------------------
1 | export { default } from "../../Engines/Markdown.js";
2 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Nunjucks.core.js:
--------------------------------------------------------------------------------
1 | // Must load dynamically in standard core
2 | export default undefined;
3 |
--------------------------------------------------------------------------------
/src/Adapters/Engines/Nunjucks.js:
--------------------------------------------------------------------------------
1 | export { default } from "../../Engines/Nunjucks.js";
2 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/chalk.client.js:
--------------------------------------------------------------------------------
1 | function noop(arg) {
2 | return arg;
3 | }
4 | export default {
5 | bold: noop,
6 | red: noop,
7 | gray: noop,
8 | cyan: noop,
9 | yellow: noop,
10 | };
11 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/chalk.js:
--------------------------------------------------------------------------------
1 | import chalk from "kleur";
2 |
3 | export default chalk;
4 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/inspect.core.js:
--------------------------------------------------------------------------------
1 | export function inspect(target) {
2 | return JSON.stringify(target, null, 2);
3 | }
4 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/inspect.js:
--------------------------------------------------------------------------------
1 | import { inspect as nodeInspect } from "node:util";
2 |
3 | export function inspect(target) {
4 | return nodeInspect(target, { showHidden: false, depth: null });
5 | }
6 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/semver.client.js:
--------------------------------------------------------------------------------
1 | export function satisfies(version, range) {
2 | // Always return true
3 | return true;
4 | }
5 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/semver.js:
--------------------------------------------------------------------------------
1 | // Costs ~18 KB
2 | import semverSatisfies from "semver/functions/satisfies.js";
3 |
4 | export { semverSatisfies as satisfies };
5 |
--------------------------------------------------------------------------------
/src/Adapters/Packages/url.js:
--------------------------------------------------------------------------------
1 | export { fileURLToPath } from "node:url";
2 |
--------------------------------------------------------------------------------
/src/Adapters/getDefaultConfig.core.js:
--------------------------------------------------------------------------------
1 | import defaultConfig from "../defaultConfig.js";
2 |
3 | // Standard and minimal bundle import directly for bundling
4 | export default async function () {
5 | return defaultConfig;
6 | }
7 |
--------------------------------------------------------------------------------
/src/Adapters/getDefaultConfig.js:
--------------------------------------------------------------------------------
1 | // Standard
2 | export default async function () {
3 | return import("../defaultConfig.js").then((mod) => mod.default);
4 | }
5 |
--------------------------------------------------------------------------------
/src/Errors/DuplicatePermalinkOutputError.js:
--------------------------------------------------------------------------------
1 | import EleventyBaseError from "./EleventyBaseError.js";
2 |
3 | class DuplicatePermalinkOutputError extends EleventyBaseError {
4 | get removeDuplicateErrorStringFromOutput() {
5 | return true;
6 | }
7 | }
8 |
9 | export default DuplicatePermalinkOutputError;
10 |
--------------------------------------------------------------------------------
/src/Errors/TemplateContentPrematureUseError.js:
--------------------------------------------------------------------------------
1 | import EleventyBaseError from "./EleventyBaseError.js";
2 |
3 | class TemplateContentPrematureUseError extends EleventyBaseError {}
4 |
5 | export default TemplateContentPrematureUseError;
6 |
--------------------------------------------------------------------------------
/src/Errors/TemplateContentUnrenderedTemplateError.js:
--------------------------------------------------------------------------------
1 | import EleventyBaseError from "./EleventyBaseError.js";
2 |
3 | class TemplateContentUnrenderedTemplateError extends EleventyBaseError {}
4 |
5 | export default TemplateContentUnrenderedTemplateError;
6 |
--------------------------------------------------------------------------------
/src/Errors/UsingCircularTemplateContentReferenceError.js:
--------------------------------------------------------------------------------
1 | import EleventyBaseError from "./EleventyBaseError.js";
2 |
3 | class UsingCircularTemplateContentReferenceError extends EleventyBaseError {}
4 |
5 | export default UsingCircularTemplateContentReferenceError;
6 |
--------------------------------------------------------------------------------
/src/Filters/GetCollectionItemIndex.js:
--------------------------------------------------------------------------------
1 | // TODO locale-friendly, see GetLocaleCollectionItem.js)
2 | export default function getCollectionItemIndex(collection, page) {
3 | if (!page) {
4 | page = this.page;
5 | }
6 |
7 | let j = 0;
8 | for (let item of collection) {
9 | if (
10 | item.inputPath === page.inputPath &&
11 | (item.outputPath === page.outputPath || item.url === page.url)
12 | ) {
13 | return j;
14 | }
15 | j++;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Util/ArrayUtil.js:
--------------------------------------------------------------------------------
1 | export function arrayDelete(arr, match) {
2 | if (!Array.isArray(arr)) {
3 | return [];
4 | }
5 |
6 | if (!match) {
7 | return arr;
8 | }
9 |
10 | // only mutates if found
11 | if (typeof match === "function") {
12 | if (arr.find(match)) {
13 | return arr.filter((entry) => {
14 | return !match(entry);
15 | });
16 | }
17 | } else if (arr.includes(match)) {
18 | return arr.filter((entry) => {
19 | return entry !== match;
20 | });
21 | }
22 |
23 | return arr;
24 | }
25 |
--------------------------------------------------------------------------------
/src/Util/DirContains.js:
--------------------------------------------------------------------------------
1 | import path from "node:path";
2 |
3 | // Returns true if subfolder is in parent (accepts absolute or relative paths for both)
4 | export default function (parentFolder, subFolder) {
5 | // path.resolve returns an absolute path
6 | if (path.resolve(subFolder).startsWith(path.resolve(parentFolder))) {
7 | return true;
8 | }
9 | return false;
10 | }
11 |
--------------------------------------------------------------------------------
/src/Util/EsmResolverPortAdapter.core.js:
--------------------------------------------------------------------------------
1 | // This is optional (and featured tested upstream)
2 | export const port1 = undefined;
3 |
--------------------------------------------------------------------------------
/src/Util/EventBusUtil.js:
--------------------------------------------------------------------------------
1 | import eventBus from "../EventBus.js";
2 | import debugUtil from "debug";
3 |
4 | const debug = debugUtil("Eleventy:EventBus");
5 |
6 | class EventBusUtil {
7 | static debugCurrentListenerCounts() {
8 | for (let name of eventBus.eventNames()) {
9 | debug("Listeners for %o: %o", name, eventBus.listenerCount(name));
10 | }
11 | }
12 | }
13 |
14 | export default EventBusUtil;
15 |
--------------------------------------------------------------------------------
/src/Util/FilePathUtil.js:
--------------------------------------------------------------------------------
1 | class FilePathUtil {
2 | static isMatchingExtension(filepath, fileExtension) {
3 | if (!fileExtension) {
4 | return false;
5 | }
6 |
7 | if (!(fileExtension || "").startsWith(".")) {
8 | fileExtension = "." + fileExtension;
9 | }
10 |
11 | return filepath.endsWith(fileExtension);
12 | }
13 |
14 | static getFileExtension(filepath) {
15 | return (filepath || "").split(".").pop();
16 | }
17 | }
18 |
19 | export { FilePathUtil };
20 |
--------------------------------------------------------------------------------
/src/Util/FileSize.js:
--------------------------------------------------------------------------------
1 | export function readableFileSize(bytes) {
2 | // Uses kilobytes and not kibibytes
3 | let entries = [
4 | [1e6, "mB"],
5 | [1e3, "kB"],
6 | ];
7 | for (let [compare, suffix] of entries) {
8 | if (Math.abs(bytes) >= compare) {
9 | return Math.round(bytes / compare) + suffix;
10 | }
11 | }
12 | return bytes + " bytes";
13 | }
14 |
--------------------------------------------------------------------------------
/src/Util/GlobMatcher.client.js:
--------------------------------------------------------------------------------
1 | export function isGlobMatch() {
2 | throw new Error(
3 | "Glob matching (e.g. getFilteredByGlob collection API method) is not supported in the `@11ty/client` bundle. Use the `@11ty/client/eleventy` bundle instead.",
4 | );
5 | }
6 |
7 | // When using a glob as an input (see ProjectDirectories)
8 | export function isDynamicPattern(pattern) {
9 | return false;
10 | }
11 |
--------------------------------------------------------------------------------
/src/Util/IsAsyncFunction.js:
--------------------------------------------------------------------------------
1 | const ComparisonAsyncFunction = (async () => {}).constructor;
2 |
3 | export default function isAsyncFunction(fn) {
4 | return fn instanceof ComparisonAsyncFunction;
5 | }
6 |
--------------------------------------------------------------------------------
/src/Util/JavaScriptDependencies.core.js:
--------------------------------------------------------------------------------
1 | class JavaScriptDependencies {
2 | static async getDependencies() {
3 | throw new Error("This feature is not supported in `@11ty/client` bundles.");
4 | }
5 | }
6 |
7 | export default JavaScriptDependencies;
8 |
--------------------------------------------------------------------------------
/src/Util/NewLineAdapter.core.js:
--------------------------------------------------------------------------------
1 | export const EOL = "\n";
2 |
--------------------------------------------------------------------------------
/src/Util/NewLineAdapter.js:
--------------------------------------------------------------------------------
1 | export { EOL } from "node:os";
2 |
--------------------------------------------------------------------------------
/src/Util/Objects/ObjectFilter.js:
--------------------------------------------------------------------------------
1 | export default function objectFilter(obj, callback) {
2 | let newObject = {};
3 | for (let [key, value] of Object.entries(obj || {})) {
4 | if (callback(value, key)) {
5 | newObject[key] = value;
6 | }
7 | }
8 | return newObject;
9 | }
10 |
--------------------------------------------------------------------------------
/src/Util/Objects/SampleModule.mjs:
--------------------------------------------------------------------------------
1 | export default {};
2 |
--------------------------------------------------------------------------------
/src/Util/Objects/Unique.js:
--------------------------------------------------------------------------------
1 | export default function Unique(arr) {
2 | return Array.from(new Set(arr));
3 | }
4 |
--------------------------------------------------------------------------------
/src/Util/PassthroughCopyBehaviorCheck.js:
--------------------------------------------------------------------------------
1 | function isUsingEleventyDevServer(config) {
2 | return (
3 | !config.serverOptions.module || config.serverOptions.module === "@11ty/eleventy-dev-server"
4 | );
5 | }
6 |
7 | // Config opt-in via serverPassthroughCopyBehavior
8 | // False when other server is used
9 | // False when runMode is "build" or "watch"
10 | export default function (config, runMode) {
11 | return (
12 | config.serverPassthroughCopyBehavior === "passthrough" &&
13 | isUsingEleventyDevServer(config) &&
14 | runMode === "serve"
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/src/Util/Pluralize.js:
--------------------------------------------------------------------------------
1 | export default function (count, singleWord, pluralWord) {
2 | return count === 1 ? singleWord : pluralWord;
3 | }
4 |
--------------------------------------------------------------------------------
/src/Util/PromiseUtil.js:
--------------------------------------------------------------------------------
1 | function withResolvers() {
2 | if ("withResolvers" in Promise) {
3 | return Promise.withResolvers();
4 | }
5 |
6 | let resolve;
7 | let reject;
8 | let promise = new Promise((res, rej) => {
9 | resolve = res;
10 | reject = rej;
11 | });
12 | return { promise, resolve, reject };
13 | }
14 |
15 | export { withResolvers };
16 |
--------------------------------------------------------------------------------
/src/Util/ResolvePlugin.client.js:
--------------------------------------------------------------------------------
1 | export function resolvePlugin() {
2 | throw new Error(
3 | "eleventyConfig.resolvePlugin() is not supported in the `@11ty/client` bundle. You can switch to use the larger `@11ty/client/eleventy` bundle or `import` plugins directly.",
4 | );
5 | }
6 |
--------------------------------------------------------------------------------
/src/Util/RetrieveGlobals.client.js:
--------------------------------------------------------------------------------
1 | export async function RetrieveGlobals(code, filePath) {
2 | let target = `data:text/javascript;charset=utf-8,${encodeURIComponent(code)}`;
3 | return import(/* @vite-ignore */ target).then((result) => {
4 | if (Object.keys(result).length === 0) {
5 | console.warn(
6 | `Arbitrary JavaScript front matter expects the use of \`export\` when used with the \`@11ty/client\` bundle (${filePath}). Add export or swap to use the \`@11ty/client/eleventy\` bundle instead.`,
7 | );
8 | }
9 | return result;
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/src/Util/RetrieveGlobals.core.js:
--------------------------------------------------------------------------------
1 | import { importFromString } from "import-module-string";
2 |
3 | export async function RetrieveGlobals(code, filePath) {
4 | let data = {
5 | page: {
6 | // Theoretically fileSlug and filePathStem could be added here but require extensionMap
7 | inputPath: filePath,
8 | },
9 | };
10 |
11 | // Do *not* error when imports are found because they might be mapped via an Import Map.
12 | return importFromString(code, { data, filePath });
13 | }
14 |
--------------------------------------------------------------------------------
/src/Util/SemverCoerce.js:
--------------------------------------------------------------------------------
1 | // This replaces use of semver/functions/coerce.js (which had more than we needed, we’re only targeting our local package.json for eleventy supplied global data)
2 |
3 | export function coerce(version) {
4 | let s = String(version);
5 | if (s.startsWith("v")) {
6 | s = s.slice(1);
7 | }
8 | // Remove pre-release identifier
9 | return s.split("-")[0];
10 | }
11 |
--------------------------------------------------------------------------------
/src/Util/SetUnion.js:
--------------------------------------------------------------------------------
1 | function setUnion(...sets) {
2 | let root = new Set();
3 | for (let set of sets) {
4 | for (let entry of set) {
5 | root.add(entry);
6 | }
7 | }
8 | return root;
9 | }
10 |
11 | export { setUnion };
12 |
--------------------------------------------------------------------------------
/src/Util/ValidUrl.js:
--------------------------------------------------------------------------------
1 | export default function isValidUrl(url) {
2 | try {
3 | new URL(url);
4 | return true;
5 | } catch (e) {
6 | // invalid url OR local path
7 | return false;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Util/importer.client.js:
--------------------------------------------------------------------------------
1 | export default function importer(relPath) {
2 | // TODO we could probably use a super streamlined version of import-module-string here that doesn’t support imports!
3 | throw new Error(
4 | "Dynamic import() is not supported in the `@11ty/client` bundle. Use the `@11ty/client/eleventy` bundle instead.",
5 | );
6 | }
7 |
--------------------------------------------------------------------------------
/src/Util/importer.js:
--------------------------------------------------------------------------------
1 | export default function importer(relPath) {
2 | return import(relPath);
3 | }
4 |
--------------------------------------------------------------------------------
/src/Util/spawn.core.js:
--------------------------------------------------------------------------------
1 | export function spawnAsync() {
2 | throw new Error("This feature is not supported in `@11ty/client` bundles.");
3 | }
4 |
--------------------------------------------------------------------------------
/test/Issue3788Test.js:
--------------------------------------------------------------------------------
1 | import test from "ava";
2 | import Eleventy from "../src/Eleventy.js";
3 |
4 | test("#3788 Nunjucks shortcodes args", async (t) => {
5 | let elev = new Eleventy("test/noop", false, {
6 | config(eleventyConfig) {
7 | eleventyConfig.addTemplate("index.njk", `{% test %}:{% test "" %}`);
8 |
9 | eleventyConfig.addShortcode("test", (args) => {
10 | return JSON.stringify(args);
11 | })
12 | }
13 | });
14 |
15 | let [result] = await elev.toJSON();
16 |
17 | t.is(result.content, `undefined:""`);
18 | });
19 |
--------------------------------------------------------------------------------
/test/JavaScriptDependenciesTest.js:
--------------------------------------------------------------------------------
1 | import test from "ava";
2 | import JavaScriptDependencies from "../src/Util/JavaScriptDependencies.js";
3 |
4 | test("No node_modules", async (t) => {
5 | let deps = await JavaScriptDependencies.getDependencies([
6 | "./test/stubs-dependency-tree/index.cjs",
7 | ]);
8 |
9 | t.deepEqual(deps, [
10 | "./test/stubs-dependency-tree/child.cjs",
11 | "./test/stubs-dependency-tree/grandchild.cjs",
12 | ]);
13 | });
14 |
--------------------------------------------------------------------------------
/test/PluralizeTest.js:
--------------------------------------------------------------------------------
1 | import test from "ava";
2 |
3 | import pluralize from "../src/Util/Pluralize.js";
4 |
5 | test("Pluralize", (t) => {
6 | t.is(pluralize(0, "test", "tests"), "tests");
7 | t.is(pluralize(1, "test", "tests"), "test");
8 | t.is(pluralize(2, "test", "tests"), "tests");
9 | t.is(pluralize(3, "test", "tests"), "tests");
10 | t.is(pluralize(3.5, "test", "tests"), "tests");
11 | });
12 |
--------------------------------------------------------------------------------
/test/TestUtilityTest.js:
--------------------------------------------------------------------------------
1 | import test from "ava";
2 | import { normalizeNewLines } from "./Util/normalizeNewLines.js";
3 |
4 | test("normalizeNewLines", (t) => {
5 | t.is(normalizeNewLines("\n"), "\n");
6 | t.is(normalizeNewLines("\r\n"), "\n");
7 | t.is(normalizeNewLines("\r\n\n"), "\n\n");
8 | t.is(normalizeNewLines("\r\n\r\n"), "\n\n");
9 | t.is(normalizeNewLines("a\r\nhello\r\nhi"), "a\nhello\nhi");
10 | });
11 |
--------------------------------------------------------------------------------
/test/Util/normalizeNewLines.js:
--------------------------------------------------------------------------------
1 | import os from 'node:os';
2 |
3 | function normalizeNewLines(str) {
4 | return str.replace(/\r\n/g, "\n");
5 | }
6 |
7 | function localizeNewLines(str) {
8 | return normalizeNewLines(str).replace(/\n/g, os.EOL);
9 | }
10 |
11 | export {
12 | normalizeNewLines,
13 | localizeNewLines,
14 | };
15 |
--------------------------------------------------------------------------------
/test/Util/normalizeSeparators.js:
--------------------------------------------------------------------------------
1 | import PathNormalizer from "../../src/Util/PathNormalizer.js";
2 |
3 | export function normalizeSeparatorString(str) {
4 | return PathNormalizer.normalizeSeperator(str);
5 | }
6 |
7 | export function normalizeSeparatorArray(arr) {
8 | return arr.map(entry => {
9 | return PathNormalizer.normalizeSeperator(entry);
10 | })
11 | }
12 |
--------------------------------------------------------------------------------
/test/_issues/2250/javascript.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function () {
2 | return this.getUrl();
3 | };
4 |
--------------------------------------------------------------------------------
/test/_issues/2250/liquid.liquid:
--------------------------------------------------------------------------------
1 | {{ "test" | getUrl }}
--------------------------------------------------------------------------------
/test/_issues/2250/nunjucks.njk:
--------------------------------------------------------------------------------
1 | {{ "test" | getUrl }}
--------------------------------------------------------------------------------
/test/_issues/3697/_data/folder/0.json:
--------------------------------------------------------------------------------
1 | {
2 | "key": "value"
3 | }
4 |
--------------------------------------------------------------------------------
/test/_issues/3697/_data/folder/3.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/test/_issues/3809/.app/.eleventy.js:
--------------------------------------------------------------------------------
1 | export const config = {
2 | dir: {
3 | input: "../",
4 | data: ".app/_data",
5 | }
6 | };
7 |
--------------------------------------------------------------------------------
/test/_issues/3809/.app/_data/app.json:
--------------------------------------------------------------------------------
1 | {"name": "My Application"}
2 |
--------------------------------------------------------------------------------
/test/_issues/3809/index.njk:
--------------------------------------------------------------------------------
1 | {{ app.name }}
2 |
--------------------------------------------------------------------------------
/test/_issues/3853/deeper/index.njk:
--------------------------------------------------------------------------------
1 | 3853
2 |
--------------------------------------------------------------------------------
/test/_issues/3854/app/.eleventy.js:
--------------------------------------------------------------------------------
1 | export const config = {
2 | dir: {
3 | input: "../",
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/test/_issues/3854/app/index.njk:
--------------------------------------------------------------------------------
1 | 3854/child
2 |
--------------------------------------------------------------------------------
/test/_issues/3854/index.njk:
--------------------------------------------------------------------------------
1 | 3854/parent
2 |
--------------------------------------------------------------------------------
/test/_issues/975/another-post.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | ---
5 |
--------------------------------------------------------------------------------
/test/_issues/975/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | eleventyImport:
3 | collections: ["post"]
4 | ---
5 |
--------------------------------------------------------------------------------
/test/_issues/975/post.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | ---
5 |
--------------------------------------------------------------------------------
/test/file-system-search/file.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/file-system-search/file.txt
--------------------------------------------------------------------------------
/test/noop/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/noop/.gitkeep
--------------------------------------------------------------------------------
/test/noop2/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/noop2/.gitkeep
--------------------------------------------------------------------------------
/test/proxy-pagination-globaldata/_data/banner.js:
--------------------------------------------------------------------------------
1 | export default {
2 | content: "BANNER TEXT",
3 | };
4 |
--------------------------------------------------------------------------------
/test/proxy-pagination-globaldata/tmpl.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | pages:
3 | - page 1
4 | pagination:
5 | data: pages
6 | size: 1
7 | ---
8 | {{ banner.content }}
--------------------------------------------------------------------------------
/test/proxy-pagination-globaldata/tmpl2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pages:
3 | - page 1
4 | pagination:
5 | data: pages
6 | size: 1
7 | ---
8 | {{ banner.content }}
--------------------------------------------------------------------------------
/test/proxy-pagination-globaldata/tmpl4.11ty.js:
--------------------------------------------------------------------------------
1 | const data = {
2 | pages: ["page 1"],
3 | pagination: {
4 | data: "pages",
5 | size: 1,
6 | },
7 | };
8 |
9 | const render = (data) => `${data.banner.content}`;
10 |
11 | export { data, render };
12 |
--------------------------------------------------------------------------------
/test/semverCoerceTest.js:
--------------------------------------------------------------------------------
1 | import test from "ava";
2 | import { coerce } from "../src/Util/SemverCoerce.js";
3 |
4 | test("semverCoerce", t => {
5 | t.is(coerce("4.0.0"), "4.0.0");
6 | t.is(coerce("4.0.0-prerelease"), "4.0.0");
7 | t.is(coerce("4.0"), "4.0");
8 | t.is(coerce("v4.0"), "4.0");
9 | });
10 |
--------------------------------------------------------------------------------
/test/slugify-filter/comma.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Hi, I'm ZAch"
3 | permalink: subdir/{{ title | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/multibyte.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: "test-猫"
3 | permalink: subdir/{{ title | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/slug-number.njk:
--------------------------------------------------------------------------------
1 | ---
2 | number: 1
3 | permalink: subdir/{{ number | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/slug-options.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Hi, I am ZAch"
3 | permalink: "subdir/{{ title | slugify({separator:'_'}) }}/index.html"
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/slugify-number.njk:
--------------------------------------------------------------------------------
1 | ---
2 | number: 1
3 | permalink: subdir/{{ number | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/slugify-options.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Hi, I'm ZAch"
3 | permalink: "subdir/{{ title | slugify({decamelize: true}) }}/index.html"
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/slugify-filter/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: _Slug ♥ CANDIDATE люблю $#%-
3 | permalink: subdir/{{ title | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/stubs--to/test.md:
--------------------------------------------------------------------------------
1 | # hi
2 |
--------------------------------------------------------------------------------
/test/stubs--to/test2.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: hello
3 | ---
4 | {{ hi }}
--------------------------------------------------------------------------------
/test/stubs-1206/page1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: tag1
3 | ---
4 | This is the first template.{{ page.rawInput }}
--------------------------------------------------------------------------------
/test/stubs-1206/page2.njk:
--------------------------------------------------------------------------------
1 | This is the second template.{{ collections.tag1[0].rawInput }}
--------------------------------------------------------------------------------
/test/stubs-1242/_data/xyz.dottest.json:
--------------------------------------------------------------------------------
1 | {
2 | "hi": "bye"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs-1242/_data/xyz.dottest/test.json:
--------------------------------------------------------------------------------
1 | {
2 | "abc": 42
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs-1242/empty.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-1242/empty.md
--------------------------------------------------------------------------------
/test/stubs-1325/test.11ty.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-1325/test.11ty.js
--------------------------------------------------------------------------------
/test/stubs-1325/test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-1325/test.js
--------------------------------------------------------------------------------
/test/stubs-142/index.njk:
--------------------------------------------------------------------------------
1 | ---
2 | date: git Last Modified
3 | ---
4 | {{ page.date.getTime() }}
--------------------------------------------------------------------------------
/test/stubs-1691/_data/str.txt:
--------------------------------------------------------------------------------
1 | Testing
--------------------------------------------------------------------------------
/test/stubs-1691/template.11tydata.txt:
--------------------------------------------------------------------------------
1 | Template Data File
--------------------------------------------------------------------------------
/test/stubs-1691/template.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-1691/template.njk
--------------------------------------------------------------------------------
/test/stubs-2145/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | ---
2 | LayoutData: 123
3 | ---
4 | FromLayout{{ content }}
--------------------------------------------------------------------------------
/test/stubs-2145/test.njk:
--------------------------------------------------------------------------------
1 | {{ layout }}
--------------------------------------------------------------------------------
/test/stubs-2167/paginated.njk:
--------------------------------------------------------------------------------
1 | ---
2 | dropdown:
3 | - a
4 | - b
5 | - c
6 | - d
7 | - e
8 | pagination:
9 | data: dropdown
10 | size: 1
11 | permalink: false
12 | ---
13 |
--------------------------------------------------------------------------------
/test/stubs-2224/index.njk:
--------------------------------------------------------------------------------
1 | ---
2 | date: git created
3 | ---
4 | {{ page.date.getTime() }}
--------------------------------------------------------------------------------
/test/stubs-2258-2830-skip-layouts/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | /* Banner */
2 | {{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs-2258-2830-skip-layouts/style.scss:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.njk
3 | ---
4 | code {
5 | padding: 0.25em;
6 | line-height: 0;
7 | }
--------------------------------------------------------------------------------
/test/stubs-2258/_includes/_code.scss:
--------------------------------------------------------------------------------
1 | code {
2 | padding: 0.25em;
3 | line-height: 0;
4 | }
--------------------------------------------------------------------------------
/test/stubs-2258/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | /* Banner */
2 | {{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs-2258/style.scss:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.njk
3 | ---
4 | @use "code.scss";
5 |
6 | /* Comment */
--------------------------------------------------------------------------------
/test/stubs-2367/_includes/layout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | text: layout
3 | url: "/mylayout"
4 | ---
5 | {% simplelink text url text url text url %}
6 | {% simplelink text, url, text, url, text, url %}
--------------------------------------------------------------------------------
/test/stubs-2367/templateWithLiquidShortcodeMultipleArguments-template2.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.liquid
3 | ---
--------------------------------------------------------------------------------
/test/stubs-2367/templateWithLiquidShortcodeMultipleArguments.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.liquid
3 | ---
--------------------------------------------------------------------------------
/test/stubs-2378/_data/images/dog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-2378/_data/images/dog.jpg
--------------------------------------------------------------------------------
/test/stubs-2378/_data/images/dogpng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-2378/_data/images/dogpng.png
--------------------------------------------------------------------------------
/test/stubs-2753/_data/global.js:
--------------------------------------------------------------------------------
1 | let count = 0;
2 | export default async function () {
3 | return ++count;
4 | };
5 |
--------------------------------------------------------------------------------
/test/stubs-2753/page1.njk:
--------------------------------------------------------------------------------
1 | {{ global }}
--------------------------------------------------------------------------------
/test/stubs-2753/page2.njk:
--------------------------------------------------------------------------------
1 | {{ global }}
--------------------------------------------------------------------------------
/test/stubs-2790/page.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function ({ name }) {
2 | return `${this.jsfunction(name)}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-2851/content.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: ['tag with spaces']
3 | ---
--------------------------------------------------------------------------------
/test/stubs-2851/paginated.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: "collections['tag with spaces']"
4 | size: 1
5 | ---
6 |
--------------------------------------------------------------------------------
/test/stubs-3013/html/_data/books.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "The Effervescent adventures of Paul Mescal",
5 | "shortname": "paul-mescal"
6 | },
7 | {
8 | "id": 2,
9 | "name": "Populace and Power: A user's guide",
10 | "shortname": "populace-and-power"
11 | }
12 | ]
--------------------------------------------------------------------------------
/test/stubs-3013/html/_includes/base.html:
--------------------------------------------------------------------------------
1 | ---
2 | title: Books
3 | ---
4 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3013/html/book.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base
3 | pagination:
4 | data: books
5 | size: 1
6 | alias: book
7 | permalink: /{{ book.shortname }}/
8 | eleventyComputed:
9 | title: "{{ book.name }}"
10 | ---
11 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3013/liquid/_data/books.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "The Effervescent adventures of Paul Mescal",
5 | "shortname": "paul-mescal"
6 | },
7 | {
8 | "id": 2,
9 | "name": "Populace and Power: A user's guide",
10 | "shortname": "populace-and-power"
11 | }
12 | ]
--------------------------------------------------------------------------------
/test/stubs-3013/liquid/_includes/base.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Books
3 | ---
4 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3013/liquid/book.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base
3 | pagination:
4 | data: books
5 | size: 1
6 | alias: book
7 | permalink: /{{ book.shortname }}/
8 | eleventyComputed:
9 | title: "{{ book.name }}"
10 | ---
11 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3013/md/_data/books.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "The Effervescent adventures of Paul Mescal",
5 | "shortname": "paul-mescal"
6 | },
7 | {
8 | "id": 2,
9 | "name": "Populace and Power: A user's guide",
10 | "shortname": "populace-and-power"
11 | }
12 | ]
--------------------------------------------------------------------------------
/test/stubs-3013/md/_includes/base.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Books
3 | ---
4 |
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs-3013/md/book.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base
3 | pagination:
4 | data: books
5 | size: 1
6 | alias: book
7 | permalink: /{{ book.shortname }}/
8 | eleventyComputed:
9 | title: "{{ book.name }}"
10 | ---
11 |
12 | {{ title }}
13 |
--------------------------------------------------------------------------------
/test/stubs-3013/njk/_data/books.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "The Effervescent adventures of Paul Mescal",
5 | "shortname": "paul-mescal"
6 | },
7 | {
8 | "id": 2,
9 | "name": "Populace and Power: A user's guide",
10 | "shortname": "populace-and-power"
11 | }
12 | ]
--------------------------------------------------------------------------------
/test/stubs-3013/njk/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Books
3 | ---
4 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3013/njk/book.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base
3 | pagination:
4 | data: books
5 | size: 1
6 | alias: book
7 | permalink: /{{ book.shortname }}/
8 | eleventyComputed:
9 | title: "{{ book.name }}"
10 | ---
11 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs-3285/src/scripts/hello-world.js:
--------------------------------------------------------------------------------
1 | export default function() {
2 | console.log('hello world');
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-337/data/xyz.json:
--------------------------------------------------------------------------------
1 | {
2 | "hi": "bye"
3 | }
--------------------------------------------------------------------------------
/test/stubs-337/src/empty.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-337/src/empty.md
--------------------------------------------------------------------------------
/test/stubs-3807/_layouts/base.html:
--------------------------------------------------------------------------------
1 | {% block main %}{{ content | safe }}{% endblock %}
--------------------------------------------------------------------------------
/test/stubs-3807/_layouts/home.html:
--------------------------------------------------------------------------------
1 | {% extends "test/stubs-3807/_layouts/base.html" %}{% block main %}Home{{ content | trim | safe }}{% endblock %}
--------------------------------------------------------------------------------
/test/stubs-3807/eleventy.config.js:
--------------------------------------------------------------------------------
1 | export default function(eleventyConfig) {
2 | eleventyConfig.setLayoutsDirectory("_layouts");
3 | }
4 | export const config = {
5 | markdownTemplateEngine: "njk",
6 | htmlTemplateEngine: "njk",
7 | }
--------------------------------------------------------------------------------
/test/stubs-3807/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: home.html
3 | ---
4 | Index
--------------------------------------------------------------------------------
/test/stubs-3810/_includes/promo.njk:
--------------------------------------------------------------------------------
1 | Sign up for our {{ promoType }}!
--------------------------------------------------------------------------------
/test/stubs-3810/index.md:
--------------------------------------------------------------------------------
1 | {% promo "newsletter" %}
--------------------------------------------------------------------------------
/test/stubs-403/.eleventyignore:
--------------------------------------------------------------------------------
1 | ./_includes/**
--------------------------------------------------------------------------------
/test/stubs-403/_includes/include.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-403/_includes/include.liquid
--------------------------------------------------------------------------------
/test/stubs-403/template.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-403/template.liquid
--------------------------------------------------------------------------------
/test/stubs-408-sass/_code.scss:
--------------------------------------------------------------------------------
1 | code {
2 | padding: 0.25em;
3 | line-height: 0;
4 | }
--------------------------------------------------------------------------------
/test/stubs-408-sass/style.scss:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.njk
3 | ---
4 | @use "code.scss";
5 |
6 | /* Comment */
--------------------------------------------------------------------------------
/test/stubs-413/date-frontmatter.md:
--------------------------------------------------------------------------------
1 | ---
2 | subtitle: New doc page
3 | date: 2019-03-13 20:18:42 +0000
4 | tags:
5 | - docs
6 | ---
7 |
--------------------------------------------------------------------------------
/test/stubs-434/_includes/macros-filter.njk:
--------------------------------------------------------------------------------
1 | {% macro label(text) %}{% endmacro %}
--------------------------------------------------------------------------------
/test/stubs-434/_includes/macros.njk:
--------------------------------------------------------------------------------
1 | {% macro label(text) %}{% endmacro %}
--------------------------------------------------------------------------------
/test/stubs-475/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | {{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs-475/transform-layout/transform-layout.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.njk
3 | ---
4 | This is content.
--------------------------------------------------------------------------------
/test/stubs-630/_data/globalData0.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | datakey1: "datavalue0"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/globalData1.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | datakey1: "datavalue1"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/globalData2.json:
--------------------------------------------------------------------------------
1 | {
2 | "datakey1": "datavalue2",
3 | "datakey2": "{{pkg.name}}--json"
4 | }
5 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/globalData3.yaml:
--------------------------------------------------------------------------------
1 | datakey1: datavalue3
2 | datakey2: "{{pkg.name}}--yaml"
3 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/globalData4.nosj:
--------------------------------------------------------------------------------
1 | {
2 | "datakey1": "datavalue4",
3 | "datakey2": "{{pkg.name}}--nosj"
4 | }
5 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/mergingGlobalData.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | datakey0: "cjs-value1",
3 | datakey1: "cjs-value1",
4 | cjskey: "cjs"
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/mergingGlobalData.js:
--------------------------------------------------------------------------------
1 | export default {
2 | datakey0: "js-value0",
3 | jskey: "js",
4 | };
5 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/mergingGlobalData.json:
--------------------------------------------------------------------------------
1 | {
2 | "datakey0": "json-value1",
3 | "datakey1": "json-value1",
4 | "datakey2": "json-value2",
5 | "jsonkey": "json"
6 | }
7 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/mergingGlobalData.nosj:
--------------------------------------------------------------------------------
1 | {
2 | "datakey0": "nosj-value1",
3 | "datakey1": "nosj-value1",
4 | "datakey2": "nosj-value2",
5 | "datakey3": "nosj-value3",
6 | "datakey4": "nosj-value4",
7 | "nosjkey": "nosj"
8 | }
9 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/mergingGlobalData.yaml:
--------------------------------------------------------------------------------
1 | datakey0: "yaml-value1"
2 | datakey1: "yaml-value1"
3 | datakey2: "yaml-value2"
4 | datakey3: "yaml-value3"
5 | yamlkey: "yaml"
6 |
--------------------------------------------------------------------------------
/test/stubs-630/_data/subdir/globalDataSubdir.yaml:
--------------------------------------------------------------------------------
1 | keyyaml: "yaml"
2 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | jsKey1: "js1"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.11tydata.json:
--------------------------------------------------------------------------------
1 | {
2 | "jsonKey1": "json1"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.11tydata.nosj:
--------------------------------------------------------------------------------
1 | {
2 | "nosjKey1": "nosj1"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.11tydata.yaml:
--------------------------------------------------------------------------------
1 | yamlKey2: "yaml2"
2 | yamlKey3: "yaml3"
3 | jsonKey1: "overridden"
4 | jsKey1: "overridden"
5 | nosjKey1: "overridden"
6 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "jsonKey2": "json2",
3 | "jsKey1": "overridden",
4 | "yamlKey3": "overridden"
5 | }
6 |
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.njk:
--------------------------------------------------------------------------------
1 | {{localkeyOverride}}
--------------------------------------------------------------------------------
/test/stubs-630/component-yaml/component.yaml:
--------------------------------------------------------------------------------
1 | yamlKey1: "yaml1"
2 | yamlKey2: "overridden"
3 | jsonKey1: "overridden"
4 | jsonKey2: "overridden"
5 | jsKey1: "overridden"
6 |
--------------------------------------------------------------------------------
/test/stubs-670/content.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - Cañon City
4 | ---
--------------------------------------------------------------------------------
/test/stubs-670/index.njk:
--------------------------------------------------------------------------------
1 | {{ collections | length }},{% for key,item in collections %}{{ key }},{% endfor %}
--------------------------------------------------------------------------------
/test/stubs-919/test.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function () {
2 | return {
3 | test: Math.random(),
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs-919/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | root:
3 | - one
4 | - two
5 | - three
6 | pagination:
7 | data: "root"
8 | size: 1
9 | ---
10 | {{ test | log }}
--------------------------------------------------------------------------------
/test/stubs-919/test2.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-919/test2.njk
--------------------------------------------------------------------------------
/test/stubs-absolute/test.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-absolute/test.md
--------------------------------------------------------------------------------
/test/stubs-addglobaldata-noop/test.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-addglobaldata-noop/test.txt
--------------------------------------------------------------------------------
/test/stubs-addglobaldata/test.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-addglobaldata/test.liquid
--------------------------------------------------------------------------------
/test/stubs-autocopy/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-autocopy/.gitkeep
--------------------------------------------------------------------------------
/test/stubs-autocopy/possum.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-autocopy/possum.jpg
--------------------------------------------------------------------------------
/test/stubs-autocopy/possum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-autocopy/possum.png
--------------------------------------------------------------------------------
/test/stubs-circular-layout/_includes/layout-cycle-a.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/layout-cycle-b.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-circular-layout/_includes/layout-cycle-b.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/layout-cycle-c.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-circular-layout/_includes/layout-cycle-c.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/layout-cycle-a.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-circular-layout/_includes/layout-cycle-self.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/layout-cycle-b.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-computed-array/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | dynamicValue: "test"
3 | eleventyComputed:
4 | notArray: "{{ dynamicValue }}"
5 | array:
6 | - "static value"
7 | - "{{ dynamicValue }}"
8 | ---
--------------------------------------------------------------------------------
/test/stubs-computed-collections-filter/collections.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | eleventyComputed: {
4 | test: "hello",
5 | dogCollection: data => {
6 | return data.collections.dog.filter(entry => true);
7 | }
8 | }
9 | }
10 | ---
11 | Issue #1114
--------------------------------------------------------------------------------
/test/stubs-computed-collections-filter/dog.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dog
3 | ---
4 | Hi from dog
--------------------------------------------------------------------------------
/test/stubs-computed-collections/collections.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | eleventyComputed: {
4 | test: "hello",
5 | dogCollection: data => {
6 | return data.collections.dog;
7 | }
8 | }
9 | }
10 | ---
11 | Issue #1114
--------------------------------------------------------------------------------
/test/stubs-computed-collections/dog.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dog
3 | ---
4 | Hi from dog
--------------------------------------------------------------------------------
/test/stubs-computed-dirdata/dir/dir.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | eleventyComputed: {
3 | webmentions: (data) => {
4 | return data.test;
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs-computed-dirdata/dir/first.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | test: "first",
3 | };
4 |
5 | module.exports.render = function (data) {
6 | return "first";
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs-computed-dirdata/dir/second.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | test: "second",
3 | };
4 |
5 | module.exports.render = function (data) {
6 | return "second";
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs-computed-global/_data/eleventyComputed.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | eleventyNavigation: {
3 | key: data => {
4 | return "nested-first-global";
5 | }
6 | },
7 | image2: data => {
8 | return "second-global";
9 | },
10 | image3: data => {
11 | return "third-global";
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/test/stubs-computed-global/intermix.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | eleventyComputed: {
4 | image: data => {
5 | return "first";
6 | },
7 | image2: data => {
8 | return "second";
9 | }
10 | }
11 | }
12 | ---
13 | Issue #1043
--------------------------------------------------------------------------------
/test/stubs-computed-pagination/child.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | eleventyComputed: {
3 | venues: (data) => {
4 | return data.collections.venue;
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs-computed-pagination/paginated.njk:
--------------------------------------------------------------------------------
1 | ---
2 | venues:
3 | - first
4 | - second
5 | pagination:
6 | data: venues
7 | size: 1
8 | alias: venue
9 | addAllPagesToCollections: true
10 | permalink: "venues/{{ venue }}/"
11 | tags: venue
12 | eleventyComputed:
13 | title: "{{ venue }}"
14 | ---
--------------------------------------------------------------------------------
/test/stubs-computed-symbolparse/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | eleventyComputed:
3 | c: "{{ a | fail }}{{ b | fail }}"
4 | a: "a"
5 | b: "b"
6 | ---
--------------------------------------------------------------------------------
/test/stubs-computed-symbolparse/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | eleventyComputed:
3 | c: "{{ a | fail }}{{ b | fail }}"
4 | a: "a"
5 | b: "b"
6 | ---
--------------------------------------------------------------------------------
/test/stubs-custom-extension/test.js1:
--------------------------------------------------------------------------------
1 | Paragraph
--------------------------------------------------------------------------------
/test/stubs-data-cascade/global-versus-layout/_data/cascade.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "from-global-data";
2 |
--------------------------------------------------------------------------------
/test/stubs-data-cascade/global-versus-layout/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | cascade: "from-layout-file"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/global-versus-layout/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "base.njk"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-data-files/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | shared: layout
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-data-files/test.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | shared: "datafile"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-data-files/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-dirdatafile/src/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | cascade: "from-layout-file"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-dirdatafile/src/src.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | cascade: "dir-data-file",
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-dirdatafile/src/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "base.njk"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-tmpldatafile/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | cascade: "from-layout-file"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-tmpldatafile/test.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | cascade: "template-data-file",
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-data-cascade/layout-versus-tmpldatafile/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "base.njk"
3 | ---
--------------------------------------------------------------------------------
/test/stubs-data-esm/_data/commonjs.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "commonjs default";
--------------------------------------------------------------------------------
/test/stubs-data-esm/_data/module.mjs:
--------------------------------------------------------------------------------
1 | export const named = "es module named";
2 |
3 | export default "es module default";
4 |
--------------------------------------------------------------------------------
/test/stubs-dependency-tree/child.cjs:
--------------------------------------------------------------------------------
1 | require("./grandchild.cjs");
2 |
--------------------------------------------------------------------------------
/test/stubs-dependency-tree/grandchild.cjs:
--------------------------------------------------------------------------------
1 | require("kleur");
2 |
--------------------------------------------------------------------------------
/test/stubs-dependency-tree/index.cjs:
--------------------------------------------------------------------------------
1 | require("@11ty/lodash-custom");
2 | require("./child.cjs");
3 |
--------------------------------------------------------------------------------
/test/stubs-empty-json-data/_data/empty.json:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test/stubs-empty/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-empty/.gitkeep
--------------------------------------------------------------------------------
/test/stubs-fancyjs/test.11ty.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | function render(data: object) {
4 | return hello world 1
;
5 | }
6 |
7 | export { render }
--------------------------------------------------------------------------------
/test/stubs-fancyjs/test.mdx:
--------------------------------------------------------------------------------
1 | export function Thing() {
2 | return <>World!!!!>
3 | }
4 |
5 | # Hello,
--------------------------------------------------------------------------------
/test/stubs-global-data-config-api-nested/_data/deep.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | existing: true,
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs-global-data-config-api/empty.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-global-data-config-api/empty.txt
--------------------------------------------------------------------------------
/test/stubs-i18n/en-us/index.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function (data) {
2 | return `${this.locale_url("/")}
3 | ${this.locale_url("/en-us/")}
4 | ${this.locale_url("/es/")}
5 | ${this.locale_url("/", "es")}
6 | ${this.locale_url("/non-lang-file/")}
7 | ${JSON.stringify(this.locale_links(data.page.url).sort())}
8 | ${JSON.stringify(this.locale_links().sort())}
9 | ${data.page.lang}`;
10 | };
11 |
--------------------------------------------------------------------------------
/test/stubs-i18n/en/index.liquid:
--------------------------------------------------------------------------------
1 | {{ "/" | locale_url }}
2 | {{ "/en-us/" | locale_url }}
3 | {{ "/es/" | locale_url }}
4 | {{ "/" | locale_url: "en-us" }}
5 | {{ "/non-lang-file/" | locale_url }}
6 | {{ page.url | locale_links | json }}
7 | {{ "" | locale_links | json }}
8 | {{ page.lang }}
--------------------------------------------------------------------------------
/test/stubs-i18n/es/index.njk:
--------------------------------------------------------------------------------
1 | {{ "/" | locale_url }}
2 | {{ "/en-us/" | locale_url }}
3 | {{ "/es/" | locale_url }}
4 | {{ "/" | locale_url("en-us") }}
5 | {{ "/non-lang-file/" | locale_url }}
6 | {{ page.url | locale_links | dump | safe }}
7 | {{ "" | locale_links | dump | safe }}
8 | {{ page.lang }}
--------------------------------------------------------------------------------
/test/stubs-i18n/non-lang-file.njk:
--------------------------------------------------------------------------------
1 | {{ "/" | locale_url }}
2 | {{ "/" | locale_url("en-us") }}
3 | {{ "/non-lang-file/" | locale_url }}
4 | {{ page.url | locale_links | dump | safe }}
5 | {{ "" | locale_links | dump | safe }}
6 | {{ page.lang }}
--------------------------------------------------------------------------------
/test/stubs-img-transform/ignored.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/stubs-img-transform/missing-alt.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/stubs-img-transform/multiple.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test/stubs-img-transform/possum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-img-transform/possum.png
--------------------------------------------------------------------------------
/test/stubs-img-transform/single.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/stubs-incremental/layout-chain/_includes/base.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: parent.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-incremental/layout-chain/_includes/parent.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-incremental/layout-chain/_includes/parent.njk
--------------------------------------------------------------------------------
/test/stubs-incremental/layout-chain/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base.njk
3 | ---
--------------------------------------------------------------------------------
/test/stubs-layout-cache/_includes/layout.liquid:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/stubs-layout-cache/_includes/layout.njk:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/stubs-layout-cache/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "layout.liquid"
3 | ---
4 | Content
--------------------------------------------------------------------------------
/test/stubs-layout-cache/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "layout.njk"
3 | ---
4 | Content
--------------------------------------------------------------------------------
/test/stubs-layouts-event/_includes/first.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: second
3 | ---
4 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs-layouts-event/_includes/second.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: third.liquid
3 | ---
4 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs-layouts-event/_includes/third.liquid:
--------------------------------------------------------------------------------
1 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs-layouts-event/page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: first
3 | ---
4 |
--------------------------------------------------------------------------------
/test/stubs-njk-async/_includes/loop.njk:
--------------------------------------------------------------------------------
1 | included_{{item}}-{% genericshortcode item %}
--------------------------------------------------------------------------------
/test/stubs-pagination-computed-quotes-njk/post.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: posts
3 | ---
4 | No
--------------------------------------------------------------------------------
/test/stubs-pagination-computed-quotes-njk/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: "collections.posts"
4 | size: 1
5 | quotes:
6 | - The person that shared this is awesome
7 | eleventyComputed:
8 | quote: "{{ quotes | selectRandomFromArray }}"
9 | ---
10 | {{ quote }}
--------------------------------------------------------------------------------
/test/stubs-pagination-computed-quotes/post.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | tags: posts
3 | ---
4 | No
--------------------------------------------------------------------------------
/test/stubs-pagination-computed-quotes/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: "collections.posts"
4 | size: 1
5 | quotes:
6 | - The person that shared this is awesome
7 | eleventyComputed:
8 | quote: "{{ quotes | selectRandomFromArray }}"
9 | ---
10 | {{ quote }}
--------------------------------------------------------------------------------
/test/stubs-pathtourl/css.njk:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: output.css
3 | ---
--------------------------------------------------------------------------------
/test/stubs-pathtourl/tmpl.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-pathtourl/tmpl.njk
--------------------------------------------------------------------------------
/test/stubs-render-plugin/11tyjs-file-override.njk:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderFile "./test/stubs-render-plugin/_includes/include-js.txt", argData, "11ty.js" %}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/11tyjs-file.njk:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderFile "./test/stubs-render-plugin/_includes/include.11ty.cjs", argData %}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/11tyjs.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderTemplate "11ty.js" argData %}
8 | module.exports = "TESTING";
9 | {% endrenderTemplate %}
10 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/_includes/frontmatter.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | test: frontmatterString
3 | ---
4 | {{ test }}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/_includes/include-js.txt:
--------------------------------------------------------------------------------
1 | module.exports = "TESTING";
2 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/_includes/include.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "TESTING";
2 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/_includes/include.liquid:
--------------------------------------------------------------------------------
1 | TESTING
2 | {% renderTemplate "liquid" %}
3 | TESTING IN LIQUID
4 | {% assign liquidassign = 999 %}
5 | * {{ liquidassign }}
6 | {% endrenderTemplate %}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/_includes/include.njk:
--------------------------------------------------------------------------------
1 | TESTING
2 | {% renderTemplate "liquid" %}
3 | TESTING IN LIQUID
4 | {% assign liquidassign = 999 %}
5 | * {{ liquidassign }}
6 | {% endrenderTemplate %}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/bad-data.njk:
--------------------------------------------------------------------------------
1 | {% renderTemplate "liquid", "string" %}
2 | {{ _ }}
3 | {% endrenderTemplate %}
4 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/capture-liquid.njk:
--------------------------------------------------------------------------------
1 | ---
2 | argData:
3 | num: 2
4 | ---
5 | {% setAsync "liquidOutput" %}
6 | {% renderTemplate "liquid", argData %}
7 | {% assign liquidVar = num | times: 2 %}
8 | {{ liquidVar }}
9 | {% endrenderTemplate %}
10 | {% endsetAsync %}
11 | {{ liquidOutput }}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/capture-njk.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | argData:
3 | num: 2
4 | ---
5 | {% capture nunjucksOutput %}
6 | {% renderTemplate "njk", argData %}
7 | {% set njkVar = num * 2 %}
8 | {{ njkVar }}
9 | {% endrenderTemplate %}
10 | {% endcapture %}
11 | {{ nunjucksOutput }}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/data-no-templatelang.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | argData:
3 | name: Bruno
4 | ---
5 | {% renderTemplate argData %}
6 | # Hello {{ name }}
7 | * Testing
8 | {% endrenderTemplate %}
9 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/false.liquid:
--------------------------------------------------------------------------------
1 | {% renderTemplate %}
2 | {% assign name = "Bruno" %}
3 | # Hello {{ name }}
4 | * Testing
5 | {% endrenderTemplate %}
6 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-direct.njk:
--------------------------------------------------------------------------------
1 | {%- set nunjucksVar = 69 -%}
2 | {{ hi }}
3 | {{ nunjucksVar }}
4 | {{ "who" | testing }}
5 | {% renderTemplate "liquid", argData %}
6 | {% assign liquidVar = 138 %}
7 | * {{ hi }} test test {{ bye }} {{ liquidVar }}
8 | {% endrenderTemplate %}
9 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-eleventy.njk:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 | {% renderTemplate "liquid" %}
4 | {{ eleventy.version }}
5 | {% endrenderTemplate %}
6 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-global.njk:
--------------------------------------------------------------------------------
1 | ---
2 | hi: globalHi
3 | ---
4 | {% renderTemplate "liquid" %}
5 | {{ hi }}123
6 | {% endrenderTemplate %}
7 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-md.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Tmpl {
2 | data() {
3 | return {
4 | argData: {
5 | hi: "javascriptHi",
6 | bye: "javascriptBye",
7 | },
8 | };
9 | }
10 |
11 | async render(data) {
12 | return this.renderTemplate(
13 | `
14 | # Markdown
15 | {% assign t1 = 2 %}
16 | * {{ t1 }}
17 | `,
18 | "liquid,md",
19 | data.argData
20 | );
21 | }
22 | }
23 | module.exports = Tmpl;
24 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-md.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderTemplate "liquid,md" argData %}
8 | # Hello {{ hi }}
9 | * Testing
10 | {% endrenderTemplate %}
11 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-page.liquid:
--------------------------------------------------------------------------------
1 | {% renderTemplate "liquid" %}
2 | {{ page.url }}
3 | {% endrenderTemplate %}
4 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid-page.njk:
--------------------------------------------------------------------------------
1 | {% renderTemplate "liquid" %}
2 | {{ page.url }}
3 | {% endrenderTemplate %}
4 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/liquid.njk:
--------------------------------------------------------------------------------
1 | ---
2 | # Nunjucks
3 | hi: nunjucksHi
4 | argData:
5 | hi: liquidHi
6 | bye: liquidBye
7 | ---
8 | {%- set nunjucksVar = 69 -%}
9 | {{ hi }}
10 | {{ nunjucksVar }}
11 | {% renderTemplate "liquid", argData %}
12 | {% assign liquidVar = 138 %}
13 | * {{ hi }} test test {{ bye }} {{ liquidVar }}
14 | {% endrenderTemplate %}
15 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/md.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderTemplate "md" argData %}
8 | # Hello {{ hi }}
9 | * Testing
10 | {% endrenderTemplate %}
--------------------------------------------------------------------------------
/test/stubs-render-plugin/njk-eleventy.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 | {% renderTemplate "njk" %}
4 | {{ eleventy.version }}
5 | {% endrenderTemplate %}
6 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/njk-file-not-exist.liquid:
--------------------------------------------------------------------------------
1 | {% renderFile "./test/stubs-render-plugin/THIS_DOES_NOT_EXIST.njk" %}
2 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/njk-file.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderFile "./test/stubs-render-plugin/_includes/include.njk" argData %}
8 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/njk-file.njk:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderFile "./test/stubs-render-plugin/_includes/include.liquid", argData %}
8 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/njk-page.liquid:
--------------------------------------------------------------------------------
1 | {% renderTemplate "njk" %}
2 | {{ page.url }}
3 | {% endrenderTemplate %}
4 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/nunjucks-frontmatter.njk:
--------------------------------------------------------------------------------
1 | ---
2 | hi: "{% test %}"
3 | ---
4 | {{ hi | renderContent("njk") }}
5 | {# {% renderTemplate "njk", hi %}{{ _ }}{% endrenderTemplate %} #}
6 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/nunjucks-global.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: globalHi
3 | ---
4 | {% renderTemplate "njk" %}
5 | {{ hi }}
6 | {% endrenderTemplate %}
7 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/nunjucks.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Tmpl {
2 | data() {
3 | return {
4 | argData: {
5 | hi: "javascriptHi",
6 | bye: "javascriptBye",
7 | },
8 | };
9 | }
10 |
11 | async render(data) {
12 | return this.renderTemplate(
13 | `
14 | * {{ hi | reverse }}
15 | `,
16 | "njk",
17 | data.argData
18 | );
19 | }
20 | }
21 | module.exports = Tmpl;
22 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/nunjucks.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderTemplate "njk" argData %}
8 | {% set bye = "abldskjfl" %}
9 | * {{ hi | reverse }}
10 | * {{ bye | reverse }}
11 | {% endrenderTemplate %}
12 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/using-frontmatter.liquid:
--------------------------------------------------------------------------------
1 | {% renderFile "./test/stubs-render-plugin/_includes/frontmatter.liquid" %}
2 |
--------------------------------------------------------------------------------
/test/stubs-render-plugin/vue.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | hi: value
3 | argData:
4 | hi: liquidHi
5 | bye: liquidBye
6 | ---
7 | {% renderTemplate "vue" argData %}
8 |
9 | HELLO WE ARE VUEING
10 |
11 | {% endrenderTemplate %}
--------------------------------------------------------------------------------
/test/stubs-virtual-nowrite/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-virtual-nowrite/.gitkeep
--------------------------------------------------------------------------------
/test/stubs-virtual/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs-virtual/.gitkeep
--------------------------------------------------------------------------------
/test/stubs-virtual/eleventy.config.js:
--------------------------------------------------------------------------------
1 | // generic config file
2 | export default function(eleventyConfig) {};
--------------------------------------------------------------------------------
/test/stubs/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ./ignoredFolder/ignored.md
3 | # This is a comment
4 |
--------------------------------------------------------------------------------
/test/stubs/2016-02-01-permalinkdate.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Date Permalink
3 | permalink: "/{{ page.date | date: '%Y/%m/%d' }}/index.html"
4 | ---
5 | Date Permalinks
--------------------------------------------------------------------------------
/test/stubs/_data/globalData.json:
--------------------------------------------------------------------------------
1 | {
2 | "datakey1": "datavalue1",
3 | "datakey2": "{{pkg.name}}"
4 | }
5 |
--------------------------------------------------------------------------------
/test/stubs/_data/globalData2.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | datakeyfromjs: "howdy"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/_data/globalDataFn.js:
--------------------------------------------------------------------------------
1 | import dep1 from "../deps/dep1.cjs";
2 |
3 | export default function () {
4 | return {
5 | datakeyfromjsfn: "howdy",
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/test/stubs/_data/globalDataFnCJS.cjs:
--------------------------------------------------------------------------------
1 | const dep1 = require("../deps/dep1.cjs");
2 |
3 | module.exports = function() {
4 | return {
5 | datakeyfromcjsfn: "common-cjs-howdy"
6 | };
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs/_data/subdir/testDataSubdir.json:
--------------------------------------------------------------------------------
1 | {
2 | "subdirkey": "subdirvalue"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs/_data/testData.json:
--------------------------------------------------------------------------------
1 | {
2 | "testdatakey1": "testdatavalue1"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs/_data/testDataLiquid.json:
--------------------------------------------------------------------------------
1 | {
2 | "datakey1": "datavalue1",
3 | "datakey2": "{{ pkg.name }}"
4 | }
5 |
--------------------------------------------------------------------------------
/test/stubs/_includes/base.njk:
--------------------------------------------------------------------------------
1 | {% block content %}This is a parent.{% endblock %}
--------------------------------------------------------------------------------
/test/stubs/_includes/custom-filter.liquid:
--------------------------------------------------------------------------------
1 | {{ name | makeItFoo }}
--------------------------------------------------------------------------------
/test/stubs/_includes/default.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_includes/default.liquid
--------------------------------------------------------------------------------
/test/stubs/_includes/defaultLayout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | keylayout: valuelayout
3 | postRank: 4
4 | daysPosted: 152
5 | yearsPosted: 0.4
6 | ---
7 |
8 |
9 | {{ content }}
10 |
11 |
--------------------------------------------------------------------------------
/test/stubs/_includes/defaultLayoutLayoutContent.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | keylayout: valuelayout
3 | postRank: 4
4 | daysPosted: 152
5 | yearsPosted: 0.4
6 | ---
7 |
8 |
9 | {{ content }}
10 |
--------------------------------------------------------------------------------
/test/stubs/_includes/imports.njk:
--------------------------------------------------------------------------------
1 | {% macro label(text) %}{% endmacro %}
--------------------------------------------------------------------------------
/test/stubs/_includes/included-data.html:
--------------------------------------------------------------------------------
1 | This is an include. {{ myVariable }}
2 |
--------------------------------------------------------------------------------
/test/stubs/_includes/included-relative.njk:
--------------------------------------------------------------------------------
1 | akdlsjafkljdskl
--------------------------------------------------------------------------------
/test/stubs/_includes/included.html:
--------------------------------------------------------------------------------
1 | This is an include.
--------------------------------------------------------------------------------
/test/stubs/_includes/included.liquid:
--------------------------------------------------------------------------------
1 | This is an include.
--------------------------------------------------------------------------------
/test/stubs/_includes/included.njk:
--------------------------------------------------------------------------------
1 | This is an include.
--------------------------------------------------------------------------------
/test/stubs/_includes/included.nunj:
--------------------------------------------------------------------------------
1 | Nunjabusiness
--------------------------------------------------------------------------------
/test/stubs/_includes/layout-a.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout-b
3 | key1: value1-a
4 | upstream: value2-a
5 | ---
6 |
7 |
8 | {{ content }}
9 |
10 |
--------------------------------------------------------------------------------
/test/stubs/_includes/layout-b.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1-b
3 | upstream: value2-b
4 | daysPosted: 154
5 | ---
6 |
7 |
8 | {{ content }}
9 |
10 |
--------------------------------------------------------------------------------
/test/stubs/_includes/layoutLiquid.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | keylayout: valuelayout
3 | ---
4 |
5 |
6 | {{ content }}
7 |
8 |
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/div-wrapper-layout.njk:
--------------------------------------------------------------------------------
1 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/engineOverrides.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layoutkey: layoutvalue
3 | ---
4 | {{ content | safe }}
5 |
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/engineOverridesMd.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layoutkey: layoutvalue
3 | ---
4 | # Layout header
5 |
6 | {{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/inasubdir.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_includes/layouts/inasubdir.njk
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/issue-115.liquid:
--------------------------------------------------------------------------------
1 | {% for foo in pagination.items -%}
2 | {{ foo.data.title }}
3 | {% endfor -%}
4 | {% for bar in collections.bars -%}
5 | {{ bar.data.title }}
6 | {% endfor -%}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/layout-contentdump.njk:
--------------------------------------------------------------------------------
1 | ---
2 | inherits: a
3 | layout: layouts/layout-inherit-b.njk
4 | ---
5 | {{content | default("this is bad")}} {{inherits}}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/layout-inherit-a.njk:
--------------------------------------------------------------------------------
1 | ---
2 | inherits: a
3 | layout: layouts/layout-inherit-b.njk
4 | ---
5 | {{content}} {{inherits}}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/layout-inherit-b.njk:
--------------------------------------------------------------------------------
1 | ---
2 | inherits: b
3 | secondinherits: b
4 | layout: layouts/layout-inherit-c.njk
5 | ---
6 | {{ content | safe }} {{secondinherits}}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/layout-inherit-c.njk:
--------------------------------------------------------------------------------
1 | ---
2 | inherits: c
3 | secondinherits: c
4 | thirdinherits: c
5 | ---
6 | {{ content | safe }} {{inherits}} {{thirdinherits}}
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/post.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_includes/layouts/post.liquid
--------------------------------------------------------------------------------
/test/stubs/_includes/layouts/templateMapCollection.njk:
--------------------------------------------------------------------------------
1 | ---
2 | upstream: Inherited
3 | ---
4 |
5 | {{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs/_includes/multiple.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_includes/multiple.liquid
--------------------------------------------------------------------------------
/test/stubs/_includes/multiple.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_includes/multiple.md
--------------------------------------------------------------------------------
/test/stubs/_includes/mylocallayout.njk:
--------------------------------------------------------------------------------
1 | {{ content | safe }}
2 |
--------------------------------------------------------------------------------
/test/stubs/_includes/permalink-data-layout.njk:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: "{{ page.fileSlug }}/index.html"
3 | ---
4 | Wrapper:{{ content | safe }}
--------------------------------------------------------------------------------
/test/stubs/_includes/permalink-in-layout/layout-fileslug.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: test/{{ page.fileSlug }}/
3 | ---
4 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs/_includes/permalink-in-layout/layout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: hello/index.html
3 | ---
4 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs/_includes/scopeleak.liquid:
--------------------------------------------------------------------------------
1 | {% assign test = 2 %}{{ test }}
--------------------------------------------------------------------------------
/test/stubs/_includes/subfolder/included.html:
--------------------------------------------------------------------------------
1 | This is an include.
--------------------------------------------------------------------------------
/test/stubs/_includes/subfolder/included.liquid:
--------------------------------------------------------------------------------
1 | This is an include.
--------------------------------------------------------------------------------
/test/stubs/_includes/subfolder/included.nunj:
--------------------------------------------------------------------------------
1 | Nunjabusiness2
--------------------------------------------------------------------------------
/test/stubs/_includes/test.js:
--------------------------------------------------------------------------------
1 | /* THIS IS A COMMENT */ alert("Issue #398");
2 |
--------------------------------------------------------------------------------
/test/stubs/_layouts/layoutsdefault.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/_layouts/layoutsdefault.liquid
--------------------------------------------------------------------------------
/test/stubs/add-extension/test.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/add-extension/test.njk
--------------------------------------------------------------------------------
/test/stubs/add-extension/test.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/add-extension/test.txt
--------------------------------------------------------------------------------
/test/stubs/broken-config.cjs:
--------------------------------------------------------------------------------
1 | const missingModule = require("this-is-a-module-that-does-not-exist");
2 |
3 | module.exports = function(eleventyConfig) {
4 | eleventyConfig.addFilter("cssmin", function(code) {
5 | return missingModule(code);
6 | });
7 |
8 | return {};
9 | };
10 |
--------------------------------------------------------------------------------
/test/stubs/buffer.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = Buffer.from("tést
");
2 |
--------------------------------------------------------------------------------
/test/stubs/cfg-directories-export-cjs/eleventy.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(eleventyConfig) {
2 |
3 | };
4 |
5 | module.exports.config = {
6 | dir: {
7 | input: "src",
8 | includes: "myincludes2",
9 | data: "mydata2",
10 | output: "dist2"
11 | }
12 | }
--------------------------------------------------------------------------------
/test/stubs/cfg-directories-export-cjs/src/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/cfg-directories-export-cjs/src/.gitkeep
--------------------------------------------------------------------------------
/test/stubs/cfg-directories-export/eleventy.config.js:
--------------------------------------------------------------------------------
1 | export default function(eleventyConfig) {
2 |
3 | };
4 |
5 | export const config = {
6 | dir: {
7 | input: "src",
8 | includes: "myincludes",
9 | data: "mydata",
10 | output: "dist"
11 | }
12 | };
--------------------------------------------------------------------------------
/test/stubs/cfg-directories-export/src/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/cfg-directories-export/src/.gitkeep
--------------------------------------------------------------------------------
/test/stubs/class-async-data-fn.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | async data() {
3 | return new Promise((resolve, reject) => {
4 | setTimeout(function() {
5 | resolve({
6 | name: "Ted"
7 | });
8 | }, 50);
9 | });
10 | }
11 |
12 | render({ name }) {
13 | return `${name}
`;
14 | }
15 | }
16 |
17 | module.exports = Test;
18 |
--------------------------------------------------------------------------------
/test/stubs/class-async-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | static returnsTed() {
3 | return "Ted";
4 | }
5 |
6 | returnsBill() {
7 | return "Bill";
8 | }
9 |
10 | async render({ name }) {
11 | return Promise.resolve(
12 | `${this.upper(name)}${this.returnsBill()}${Test.returnsTed()}
`
13 | );
14 | }
15 | }
16 |
17 | module.exports = Test;
18 |
--------------------------------------------------------------------------------
/test/stubs/class-async.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | async render({ name }) {
3 | return Promise.resolve(`${name}
`);
4 | }
5 | }
6 |
7 | module.exports = Test;
8 |
--------------------------------------------------------------------------------
/test/stubs/class-buffer.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | returnsBill() {
3 | return "Bill";
4 | }
5 |
6 | static returnsTed() {
7 | return "Ted";
8 | }
9 |
10 | render({ name }) {
11 | return Buffer.from(
12 | `${name}${this.returnsBill()}${Test.returnsTed()}
`
13 | );
14 | }
15 | }
16 |
17 | module.exports = Test;
18 |
--------------------------------------------------------------------------------
/test/stubs/class-data-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | name: "Ted"
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${this.upper(name)}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-data-fn-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | data() {
3 | return {
4 | name: "Ted"
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${this.upper(name)}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-data-fn.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | data() {
3 | return {
4 | name: "Ted"
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${name}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink-async-fn.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | key: "value1",
5 | permalink: async function(data) {
6 | return new Promise((resolve, reject) => {
7 | setTimeout(function() {
8 | resolve(`/my-permalink/${data.key}/`);
9 | }, 100);
10 | });
11 | }
12 | };
13 | }
14 |
15 | render({ name }) {
16 | return `${name}
`;
17 | }
18 | }
19 |
20 | module.exports = Test;
21 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink-buffer.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | permalink: Buffer.from("/my-permalink/")
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${name}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink-fn-buffer.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | key: "value1",
5 | permalink: data => Buffer.from(`/my-permalink/${data.key}/`)
6 | };
7 | }
8 |
9 | render({ name }) {
10 | return `${name}
`;
11 | }
12 | }
13 |
14 | module.exports = Test;
15 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink-fn-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | title: "My Super Cool Title",
5 | permalink: function({ title }) {
6 | return `/my-permalink/${this.slugify(title)}/`;
7 | }
8 | };
9 | }
10 |
11 | render({ name }) {
12 | return `${name}
`;
13 | }
14 | }
15 |
16 | module.exports = Test;
17 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink-fn.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | key: "value1",
5 | permalink: data => `/my-permalink/${data.key}/`
6 | };
7 | }
8 |
9 | render({ name }) {
10 | return `${name}
`;
11 | }
12 | }
13 |
14 | module.exports = Test;
15 |
--------------------------------------------------------------------------------
/test/stubs/class-data-permalink.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | permalink: "/my-permalink/"
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${name}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-data.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | get data() {
3 | return {
4 | name: "Ted"
5 | };
6 | }
7 |
8 | render({ name }) {
9 | return `${name}
`;
10 | }
11 | }
12 |
13 | module.exports = Test;
14 |
--------------------------------------------------------------------------------
/test/stubs/class-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | static returnsTed() {
3 | return "Ted";
4 | }
5 |
6 | returnsBill() {
7 | return "Bill";
8 | }
9 |
10 | render({ name }) {
11 | return `${this.upper(
12 | name
13 | )}${this.returnsBill()}${Test.returnsTed()}
`;
14 | }
15 | }
16 |
17 | module.exports = Test;
18 |
--------------------------------------------------------------------------------
/test/stubs/class-fns-has-page.11ty.cjs:
--------------------------------------------------------------------------------
1 | class TestWithPage {
2 | get page() {
3 | return "this-is-my-page";
4 | }
5 |
6 | render(data) {
7 | data.avaTest.is(this.page, "this-is-my-page");
8 | data.avaTest.is(data.page.url, "/hi/");
9 | }
10 | }
11 |
12 | module.exports = TestWithPage;
13 |
--------------------------------------------------------------------------------
/test/stubs/class-fns.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | render({ avaTest }) {
3 | avaTest.truthy(this.url);
4 | avaTest.truthy(this.slug);
5 | avaTest.truthy(this.log);
6 | avaTest.truthy(this.getPreviousCollectionItem);
7 | avaTest.truthy(this.getNextCollectionItem);
8 | avaTest.truthy(this.page);
9 | }
10 | }
11 |
12 | module.exports = Test;
13 |
--------------------------------------------------------------------------------
/test/stubs/class-norender.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | data() {
3 | return {
4 | name: "Ted"
5 | };
6 | }
7 | }
8 |
9 | module.exports = Test;
10 |
--------------------------------------------------------------------------------
/test/stubs/class-with-dep-upstream.js:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/class-with-dep.11ty.cjs:
--------------------------------------------------------------------------------
1 | const Dep = require("./class-with-dep-upstream.js");
2 |
3 | class Test {
4 | returnsBill() {
5 | return "Bill";
6 | }
7 | static returnsTed() {
8 | return "Ted";
9 | }
10 | render({ name }) {
11 | return `${name}${this.returnsBill()}${Test.returnsTed()}
`;
12 | }
13 | }
14 |
15 | module.exports = Test;
--------------------------------------------------------------------------------
/test/stubs/class.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | returnsBill() {
3 | return "Bill";
4 | }
5 |
6 | static returnsTed() {
7 | return "Ted";
8 | }
9 |
10 | render({ name }) {
11 | return `${name}${this.returnsBill()}${Test.returnsTed()}
`;
12 | }
13 | }
14 |
15 | module.exports = Test;
16 |
--------------------------------------------------------------------------------
/test/stubs/classfields-data.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | data = {
3 | name: "Ted"
4 | };
5 |
6 | render({ name }) {
7 | return `${name}
`;
8 | }
9 | }
10 |
11 | module.exports = Test;
12 |
--------------------------------------------------------------------------------
/test/stubs/cmd-help-processing/_data/test.js:
--------------------------------------------------------------------------------
1 | console.log("THIS SHOULD NOT LOG TO CONSOLE");
2 | module.exports = [];
3 |
--------------------------------------------------------------------------------
/test/stubs/collection-layout-wrap.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Layout Test
3 | layout: layouts/div-wrapper-layout.njk
4 | ---
5 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/collection-layout/_includes/layout.liquid:
--------------------------------------------------------------------------------
1 | Layout
2 |
3 | {{ content }}
4 |
5 | All {{ collections.all | size }} templates
6 | Layout {{ collections.dog | size }} dog
--------------------------------------------------------------------------------
/test/stubs/collection-layout/dog1.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - dog
4 | ---
--------------------------------------------------------------------------------
/test/stubs/collection-layout/template.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.liquid
3 | ---
4 | Template
--------------------------------------------------------------------------------
/test/stubs/collection-slug/dog1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - dog
4 | ---
--------------------------------------------------------------------------------
/test/stubs/collection-slug/template.njk:
--------------------------------------------------------------------------------
1 | fileSlug:{% for post in collections.dog %}{{ post.url }}:{{ post.fileSlug }}{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/collection-template/_includes/layout.liquid:
--------------------------------------------------------------------------------
1 | Layout
2 |
3 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs/collection-template/dog1.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - dog
4 | ---
--------------------------------------------------------------------------------
/test/stubs/collection-template/template.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout.liquid
3 | ---
4 | Template
5 |
6 | All {{ collections.all | size }} templates
7 | Template {{ collections.dog | size }} dog
--------------------------------------------------------------------------------
/test/stubs/collection/test1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | ---
7 |
8 | # Test 1
9 |
--------------------------------------------------------------------------------
/test/stubs/collection/test10.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - office
6 | eleventyExcludeFromCollections:
7 | - post
8 | ---
9 |
10 | # Test 1
11 |
--------------------------------------------------------------------------------
/test/stubs/collection/test2.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: cat
3 | ---
4 |
5 | # Test 2
6 |
--------------------------------------------------------------------------------
/test/stubs/collection/test3.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | - cat
5 | ---
6 |
7 | # Test 3
8 |
--------------------------------------------------------------------------------
/test/stubs/collection/test4.md:
--------------------------------------------------------------------------------
1 | ---
2 | date: 1983-01-01
3 | ---
4 |
5 | # Test 3
6 |
--------------------------------------------------------------------------------
/test/stubs/collection/test5.md:
--------------------------------------------------------------------------------
1 | ---
2 | date: 2038-01-01
3 | ---
4 |
5 | # Test 3
6 |
--------------------------------------------------------------------------------
/test/stubs/collection/test6.html:
--------------------------------------------------------------------------------
1 | # Test 6
2 |
--------------------------------------------------------------------------------
/test/stubs/collection/test7.njk:
--------------------------------------------------------------------------------
1 | # Test 7
--------------------------------------------------------------------------------
/test/stubs/collection/test8.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - office
6 | eleventyExcludeFromCollections: true
7 | ---
8 |
9 | # Test 1
10 |
--------------------------------------------------------------------------------
/test/stubs/collection/test9.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - office
6 | eleventyExcludeFromCollections: post
7 | ---
8 |
9 | # Test 1
10 |
--------------------------------------------------------------------------------
/test/stubs/collection2/test1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | date: 2009-01-01
7 | ---
8 |
9 | # Test 1
10 |
--------------------------------------------------------------------------------
/test/stubs/collection2/test2.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | - cat
5 | date: 2010-01-01
6 | ---
7 |
8 | # Test 2
9 |
--------------------------------------------------------------------------------
/test/stubs/component-async/component.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = async function() {
2 | return new Promise(resolve => {
3 | setTimeout(function() {
4 | resolve({
5 | localdatakeyfromcjs: "common-js-howdydoody"
6 | });
7 | }, 1);
8 | });
9 | };
10 |
--------------------------------------------------------------------------------
/test/stubs/component-async/component.11tydata.js:
--------------------------------------------------------------------------------
1 | export default async function () {
2 | return new Promise((resolve) => {
3 | setTimeout(function () {
4 | resolve({
5 | localdatakeyfromjs: "howdydoody",
6 | });
7 | }, 1);
8 | });
9 | }
10 |
--------------------------------------------------------------------------------
/test/stubs/component-async/component.njk:
--------------------------------------------------------------------------------
1 | {{localdatakey1}}
--------------------------------------------------------------------------------
/test/stubs/component/component.11tydata.cjs:
--------------------------------------------------------------------------------
1 | const dep2 = require("../deps/dep2.cjs");
2 |
3 | module.exports = {
4 | localdatakeyfromcjs: "common-js-howdydoody"
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/component/component.11tydata.js:
--------------------------------------------------------------------------------
1 | import dep2 from "../deps/dep2.cjs";
2 |
3 | export default {
4 | localdatakeyfromjs: "howdydoody",
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/component/component.11tydata.json:
--------------------------------------------------------------------------------
1 | {
2 | "localdatakeyfromjs": "this_is_overridden",
3 | "localdatakeyfromcjs": "this_is_overridden",
4 | "localdatakeyfromjs2": "howdy2"
5 | }
6 |
--------------------------------------------------------------------------------
/test/stubs/component/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "localdatakey1": "localdatavalue1",
3 | "localdatakeyfromjs": "this_is_also_overridden"
4 | }
5 |
--------------------------------------------------------------------------------
/test/stubs/component/component.njk:
--------------------------------------------------------------------------------
1 | {{localdatakey1}}
--------------------------------------------------------------------------------
/test/stubs/config-deps-upstream.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/config-deps.cjs:
--------------------------------------------------------------------------------
1 | const pretty = require("pretty");
2 | const Dep = require("./config-deps-upstream.cjs");
3 |
4 | module.exports = function(config) {
5 | return {};
6 | };
7 |
--------------------------------------------------------------------------------
/test/stubs/config-empty-pathprefix.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function (config) {
2 | return {
3 | pathPrefix: "",
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/config-promise.js:
--------------------------------------------------------------------------------
1 | module.exports = async function() {
2 | return {
3 | layouts: "promise"
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/custom-extension-no-permalink.txt:
--------------------------------------------------------------------------------
1 | Sample content
--------------------------------------------------------------------------------
/test/stubs/custom-extension.txt:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: custom-extension.lit
3 | ---
4 | Sample content
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-excerpt-comment.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.
5 |
6 | This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-newline1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.---
5 | This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-newline2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.---This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-newline3.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.
5 | ---This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-nonewline.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.
5 | ---This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template-toml.njk:
--------------------------------------------------------------------------------
1 | ---toml
2 | front = "hello"
3 | ---
4 | This is content.
--------------------------------------------------------------------------------
/test/stubs/custom-frontmatter/template.njk:
--------------------------------------------------------------------------------
1 | ---
2 | front: hello
3 | ---
4 | This is an excerpt.
5 | ---
6 | This is content.
--------------------------------------------------------------------------------
/test/stubs/data-cascade/template.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | parent: {
3 | child: 2,
4 | datafile: true,
5 | },
6 | datafile: true,
7 | tags: ["tagC", "tagD", "tagD"],
8 | };
9 |
--------------------------------------------------------------------------------
/test/stubs/data-cascade/template.njk:
--------------------------------------------------------------------------------
1 | ---
2 | parent:
3 | child: -2
4 | frontmatter: true
5 | frontmatter: true
6 | tags:
7 | - tagA
8 | - tagB
9 | ---
--------------------------------------------------------------------------------
/test/stubs/datafiledoesnotexist/template.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/datafiledoesnotexist/template.njk
--------------------------------------------------------------------------------
/test/stubs/dates/2018-01-01-file5.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | ---
4 |
--------------------------------------------------------------------------------
/test/stubs/dates/2019-01-01-folder/2020-01-01-file.md:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
--------------------------------------------------------------------------------
/test/stubs/dates/file1.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | ---
4 |
5 | Assume file created time.
6 |
--------------------------------------------------------------------------------
/test/stubs/dates/file2.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | date: "2016-01-01"
4 | ---
5 |
--------------------------------------------------------------------------------
/test/stubs/dates/file2b.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | date: 2016-01-01
4 | ---
5 |
--------------------------------------------------------------------------------
/test/stubs/dates/file3.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | date: Last Modified
4 | ---
5 |
--------------------------------------------------------------------------------
/test/stubs/dates/file4.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: dateTestTag
3 | date: Created
4 | ---
5 |
--------------------------------------------------------------------------------
/test/stubs/default-class-export-and-others.11ty.js:
--------------------------------------------------------------------------------
1 | export default class IndexPage {
2 | render(data) {
3 | const name = world();
4 | return `hello
`;
5 | }
6 | }
7 |
8 | export function world() {
9 | return "World";
10 | }
--------------------------------------------------------------------------------
/test/stubs/default-export-and-others.11ty.js:
--------------------------------------------------------------------------------
1 | export const foo = "test";
2 |
3 | // render
4 | export default () => "hello
";
--------------------------------------------------------------------------------
/test/stubs/default-frontmatter.txt:
--------------------------------------------------------------------------------
1 | ---
2 | frontmatter: 1
3 | ---
4 | hi
--------------------------------------------------------------------------------
/test/stubs/default-function-export-and-named-data.11ty.cjs:
--------------------------------------------------------------------------------
1 | // render
2 | module.exports = (data) => `${data.name} World
`;
3 | module.exports.data = function() {
4 | return { name: "Hello" }
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/default-function-export-and-named-data.11ty.js:
--------------------------------------------------------------------------------
1 | export function data() {
2 | return { name: "Hello" }
3 | };
4 |
5 | // render
6 | export default (data) => `${data.name} World
`;
--------------------------------------------------------------------------------
/test/stubs/default-no-liquid.md:
--------------------------------------------------------------------------------
1 | hi
2 |
--------------------------------------------------------------------------------
/test/stubs/default.liquid:
--------------------------------------------------------------------------------
1 | {{ "hi" }}
--------------------------------------------------------------------------------
/test/stubs/default.md:
--------------------------------------------------------------------------------
1 | {{ "hi" }}
2 |
--------------------------------------------------------------------------------
/test/stubs/dependencies/dep1.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/dependencies/dep2.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/dependencies/two-deps.11ty.cjs:
--------------------------------------------------------------------------------
1 | const dep1 = require("./dep1.cjs");
2 | const dep2 = require("./dep2.cjs");
3 |
4 | module.exports = "";
5 |
--------------------------------------------------------------------------------
/test/stubs/deps/dep1.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/deps/dep2.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function() {};
2 |
--------------------------------------------------------------------------------
/test/stubs/dynamic-permalink/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: "/{{justastring}}/"
3 | dynamicPermalink: false
4 | ---
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/first.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | key2: value2-{{ key1 }}.css
5 | ---
6 | hi:{{ key2 }}
7 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/override-reuse.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | key1: "over({{key1}})ride"
5 | ---
6 | hi:{{ key1 }}
7 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/override.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | key1: override
5 | ---
6 | hi:{{ key1 }}
7 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/permalink-simple.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | permalink: "haha-{{key1}}.html"
5 | ---
6 | hi:{{ key2 }}
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/permalink-slug.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: "This is a string"
3 | eleventyComputed:
4 | permalink: "haha-{{key1 | slugify}}.html"
5 | ---
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/permalink.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | permalink: "haha-{{key2}}.html"
5 | key2: "{{key1}}"
6 | dependsOnPage: "depends:{{page.url}}"
7 | nested:
8 | key3: "{{key1}}"
9 | key4: "depends on computed {{key2}}"
10 | ---
11 | hi:{{ key2 }}
12 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/second.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | key1: "value1",
4 | eleventyComputed: {
5 | key3: function(data) {
6 | return `value3-${data.key2}`;
7 | },
8 | key2: function(data) {
9 | return `value2-${data.key1}.css`;
10 | }
11 | }
12 | }
13 | ---
14 | hi:{{ key2 }}
15 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/third.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | key1: "value1",
4 | eleventyComputed: {
5 | key1: function(data) {
6 | return `value2-${data.key1}`;
7 | }
8 | }
9 | }
10 | ---
11 | hi:{{ key1 }}
12 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/true.njk:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | eleventyComputed:
4 | key2: true
5 | key3: false
6 | key4: 324
7 | ---
8 |
--------------------------------------------------------------------------------
/test/stubs/eleventyComputed/use-global-data.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | eleventyComputed: {
4 | image: data => {
5 | return data.globalData.datakey1;
6 | }
7 | }
8 | }
9 | ---
10 | Issue #1043
--------------------------------------------------------------------------------
/test/stubs/eleventyExcludeFromCollections.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | eleventyExcludeFromCollections: true
4 | tags:
5 | - post
6 | - dog
7 | ---
8 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/eleventyExcludeFromCollectionsPermalinkFalse.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | eleventyExcludeFromCollections: true
4 | permalink: false
5 | tags:
6 | - post
7 | - dog
8 | ---
9 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/engine-singletons/first.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/engine-singletons/first.njk
--------------------------------------------------------------------------------
/test/stubs/engine-singletons/second.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/engine-singletons/second.njk
--------------------------------------------------------------------------------
/test/stubs/exitCode/failure.njk:
--------------------------------------------------------------------------------
1 | {{ test() }}
--------------------------------------------------------------------------------
/test/stubs/exitCode_globalData/_data/test.js:
--------------------------------------------------------------------------------
1 | module.exports = async function () {
2 | throw new Error("Testing");
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/exitCode_globalData/test.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/exitCode_globalData/test.liquid
--------------------------------------------------------------------------------
/test/stubs/exitCode_success/success.njk:
--------------------------------------------------------------------------------
1 | {{ "hi" }}
--------------------------------------------------------------------------------
/test/stubs/exports-flatdata.11ty.cjs:
--------------------------------------------------------------------------------
1 | // This is invalid, data must be an object
2 | exports.data = "Ted";
3 |
4 | exports.render = function(name) {
5 | return `${JSON.stringify(name)}
`;
6 | };
7 |
--------------------------------------------------------------------------------
/test/stubs/fileslug.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return `${data.page.fileSlug}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/firstdir/seconddir/component.njk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/firstdir/seconddir/component.njk
--------------------------------------------------------------------------------
/test/stubs/formatTest.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | name: zach
3 | ---
4 | {{name | capitalize}}
--------------------------------------------------------------------------------
/test/stubs/frontmatter-date/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | mydate: 2009-04-15T12:34:34+01:00
3 | ---
4 | {{ mydate | date: "%Y-%m-%d" }}
--------------------------------------------------------------------------------
/test/stubs/frontmatter-date/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | mydate: 2009-04-15T01:34:34+01:00
3 | ---
4 | {{ mydate.toISOString() }}
--------------------------------------------------------------------------------
/test/stubs/function-arrow.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = ({ name }) => `${name}
`;
2 |
--------------------------------------------------------------------------------
/test/stubs/function-async-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = async function({ name }) {
2 | return `${await this.upper(name)}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/function-async.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = async function(data) {
2 | return new Promise((resolve, reject) => {
3 | setTimeout(function() {
4 | resolve(`${data.name}
`);
5 | }, 100);
6 | });
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs/function-buffer.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return Buffer.from(`${data.name}
`);
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/function-filter.11ty.cjs:
--------------------------------------------------------------------------------
1 | function myFunction({ name }) {
2 | return `${this.upper(name)}${myFunction.staticMethod()}
`;
3 | }
4 |
5 | myFunction.staticMethod = function() {
6 | return "T9000";
7 | };
8 |
9 | module.exports = myFunction;
10 |
--------------------------------------------------------------------------------
/test/stubs/function-fns.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function({ avaTest }) {
2 | avaTest.truthy(this.url);
3 | avaTest.truthy(this.slug);
4 | avaTest.truthy(this.log);
5 | avaTest.truthy(this.getPreviousCollectionItem);
6 | avaTest.truthy(this.getNextCollectionItem);
7 | avaTest.truthy(this.page);
8 |
9 | return "test";
10 | };
11 |
--------------------------------------------------------------------------------
/test/stubs/function-markdown.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return `# ${data.name}`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/function-prototype.11ty.cjs:
--------------------------------------------------------------------------------
1 | function myFunction() {}
2 |
3 | myFunction.prototype.render = function({ name }) {
4 | return `${this.upper(
5 | name
6 | )}${this.returnsBill()}${myFunction.staticMethod()}
`;
7 | };
8 |
9 | myFunction.prototype.returnsBill = function() {
10 | return "Bill";
11 | };
12 |
13 | myFunction.staticMethod = function() {
14 | return "T9001";
15 | };
16 |
17 | module.exports = myFunction;
18 |
--------------------------------------------------------------------------------
/test/stubs/function-throws-async.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = async function(data) {
2 | return `${await this.upper(data.name)}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/function-throws.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return `${this.upper(data.name)}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/function.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return `${data.name}
`;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/glob-pages/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "About"
3 | ---
4 |
5 | About
6 |
--------------------------------------------------------------------------------
/test/stubs/glob-pages/contact.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Contact"
3 | ---
4 |
5 | Contact
6 |
--------------------------------------------------------------------------------
/test/stubs/glob-pages/home.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Home"
3 | ---
4 |
5 | Home
6 |
--------------------------------------------------------------------------------
/test/stubs/global-dash-variable.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | is-it-tasty: Yes
3 | ---
4 | {{ is-it-tasty }}
--------------------------------------------------------------------------------
/test/stubs/globby/_includes/include.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/globby/_includes/include.html
--------------------------------------------------------------------------------
/test/stubs/globby/test.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/globby/test.html
--------------------------------------------------------------------------------
/test/stubs/ignore-dedupe/.gitignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ignoredFolder
--------------------------------------------------------------------------------
/test/stubs/ignore1/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignore2/.gitignore:
--------------------------------------------------------------------------------
1 | thisshouldnotexist12345
--------------------------------------------------------------------------------
/test/stubs/ignore2/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignore3/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ./ignoredFolder/ignored.md
3 | # This is a comment
4 |
--------------------------------------------------------------------------------
/test/stubs/ignore3/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignore4/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ./ignoredFolder/ignored.md
3 | # This is a comment
4 |
--------------------------------------------------------------------------------
/test/stubs/ignore4/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignore5/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/ignore5/.gitignore
--------------------------------------------------------------------------------
/test/stubs/ignore5/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignore6/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ./ignoredFolder/ignored.md
3 | # This is a comment
4 |
--------------------------------------------------------------------------------
/test/stubs/ignore6/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/ignore6/.gitignore
--------------------------------------------------------------------------------
/test/stubs/ignore6/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
1 | # This should be ignored
2 |
--------------------------------------------------------------------------------
/test/stubs/ignorelocalroot/.eleventyignore:
--------------------------------------------------------------------------------
1 | test.md
--------------------------------------------------------------------------------
/test/stubs/ignorelocalrootgitignore/.eleventyignore:
--------------------------------------------------------------------------------
1 | test.md
--------------------------------------------------------------------------------
/test/stubs/ignorelocalrootgitignore/.gitignore:
--------------------------------------------------------------------------------
1 | thisshouldnotexist12345
--------------------------------------------------------------------------------
/test/stubs/img/stub.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test/stubs/included.liquid:
--------------------------------------------------------------------------------
1 | This is not in the includes dir.
--------------------------------------------------------------------------------
/test/stubs/includer.liquid:
--------------------------------------------------------------------------------
1 | {% include 'included' %}
2 |
--------------------------------------------------------------------------------
/test/stubs/includesemptystring.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/includesemptystring.liquid
--------------------------------------------------------------------------------
/test/stubs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | This is an html template.
4 |
5 |
--------------------------------------------------------------------------------
/test/stubs/index.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/index.liquid
--------------------------------------------------------------------------------
/test/stubs/issue-115/index-with-layout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/issue-115.liquid
3 | title: My index page
4 | pagination:
5 | data: collections.foos
6 | size: 12
7 | ---
8 |
--------------------------------------------------------------------------------
/test/stubs/issue-115/index.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: My index page
3 | pagination:
4 | data: collections.foos
5 | size: 12
6 | ---
7 | {% for foo in pagination.items -%}
8 | {{ foo.data.title }}
9 | {% endfor -%}
10 | {% for bar in collections.bars -%}
11 | {{ bar.data.title }}
12 | {% endfor -%}
--------------------------------------------------------------------------------
/test/stubs/issue-115/template-bars.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This page is bars
3 | tags:
4 | - bars
5 | ---
6 | Bars
--------------------------------------------------------------------------------
/test/stubs/issue-115/template-foos.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This page is foos
3 | tags:
4 | - foos
5 | ---
6 | Foos.
--------------------------------------------------------------------------------
/test/stubs/issue-135/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "articles":
3 | [
4 | {
5 | "title": "Do you even paginate bro?",
6 | "author": "Bill Ted",
7 | "publish_date": "2018-06-22",
8 | "tags": [
9 | "post"
10 | ],
11 | "image": "/url/thing",
12 | "teaser": "Teaser copy",
13 | "body": "Raw HTML
"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/test/stubs/issue-135/template.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: articles
4 | size: 1
5 | alias: article
6 | permalink: blog/{{ article.title | slugify }}/index.html
7 | ---
8 | {{ article.body | safe }}
--------------------------------------------------------------------------------
/test/stubs/issue-522/excluded.md:
--------------------------------------------------------------------------------
1 | ---
2 | eleventyExcludeFromCollections: true
3 | ---
4 |
5 | # Test
6 |
7 | {{ collections.all[0].templateContent }}
8 |
--------------------------------------------------------------------------------
/test/stubs/issue-522/template.md:
--------------------------------------------------------------------------------
1 | # Test
2 |
--------------------------------------------------------------------------------
/test/stubs/issue-95/cat.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - cat
4 | ---
5 |
6 | # Test 8
7 |
--------------------------------------------------------------------------------
/test/stubs/issue-95/notacat.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: notacat
3 | ---
4 |
5 | # Test 8
6 |
--------------------------------------------------------------------------------
/test/stubs/layout-permalink-difflang/_includes/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: "/{{ page.fileSlug }}/"
3 | ---
4 | {{ content }}
--------------------------------------------------------------------------------
/test/stubs/layout-permalink-difflang/test.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: test.njk
3 | templateEngineOverride: md
4 | ---
5 |
6 | # Title
7 |
--------------------------------------------------------------------------------
/test/stubs/layoutsemptystring.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/layoutsemptystring.liquid
--------------------------------------------------------------------------------
/test/stubs/local-data-tags/component.11tydata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | tags: "tag3"
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/local-data-tags/component.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - tag1
4 | - tag2
5 | ---
6 | {{localdatakey1}}
--------------------------------------------------------------------------------
/test/stubs/multiple-ignores/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder
2 | ./ignoredFolder/ignored.md
3 | # This is a comment
--------------------------------------------------------------------------------
/test/stubs/multiple-ignores/ignoredFolder/ignored.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/multiple-ignores/ignoredFolder/ignored.md
--------------------------------------------------------------------------------
/test/stubs/multiple-ignores/subfolder/.eleventyignore:
--------------------------------------------------------------------------------
1 | ignoredFolder2
2 | ./ignoredFolder2/ignored2.md
3 | # This is a comment
--------------------------------------------------------------------------------
/test/stubs/multiple-ignores/subfolder/ignoredFolder2/ignored2.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/multiple-ignores/subfolder/ignoredFolder2/ignored2.md
--------------------------------------------------------------------------------
/test/stubs/multipleexports-promises.11ty.cjs:
--------------------------------------------------------------------------------
1 | exports.data = async function() {
2 | return new Promise((resolve, reject) => {
3 | setTimeout(function() {
4 | resolve({ name: "Ted" });
5 | }, 100);
6 | });
7 | };
8 |
9 | exports.render = async function({ name }) {
10 | return new Promise((resolve, reject) => {
11 | setTimeout(function() {
12 | resolve(`${name}
`);
13 | }, 100);
14 | });
15 | };
16 |
--------------------------------------------------------------------------------
/test/stubs/multipleexports.11ty.cjs:
--------------------------------------------------------------------------------
1 | exports.data = {
2 | name: "Ted"
3 | };
4 |
5 | exports.render = function({ name }) {
6 | return `${name}
`;
7 | };
8 |
--------------------------------------------------------------------------------
/test/stubs/njk-relative/dir/base.njk:
--------------------------------------------------------------------------------
1 | {% block content %}This is a parent.{% endblock %}
--------------------------------------------------------------------------------
/test/stubs/njk-relative/dir/imports.njk:
--------------------------------------------------------------------------------
1 | {% macro label(text) %}{% endmacro %}
--------------------------------------------------------------------------------
/test/stubs/njk-relative/dir/included.njk:
--------------------------------------------------------------------------------
1 | HELLO FROM THE OTHER SIDE.
--------------------------------------------------------------------------------
/test/stubs/njk-relative/dir/unique-include-123.njk:
--------------------------------------------------------------------------------
1 | HELLO FROM THE OTHER SIDE.
--------------------------------------------------------------------------------
/test/stubs/object-norender.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | data: {
3 | name: "Ted"
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/object.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | data: {
3 | name: "Ted"
4 | },
5 | render: function({ name }) {
6 | return `${name}
`;
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/test/stubs/oneinstance.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | constructor() {
3 | this.rand = Math.random();
4 | }
5 |
6 | get data() {
7 | return {
8 | name: "Ted",
9 | rand: this.rand
10 | };
11 | }
12 |
13 | render({ name }) {
14 | return `${name}${this.rand}
`;
15 | }
16 | }
17 |
18 | module.exports = Test;
19 |
--------------------------------------------------------------------------------
/test/stubs/overrides/layout.njk:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: liquid
3 | title: My Title
4 | layout: layouts/engineOverrides.njk
5 | ---
6 | {{ title | size }}
--------------------------------------------------------------------------------
/test/stubs/overrides/layoutfalse.njk:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: false
3 | title: My Title
4 | layout: layouts/engineOverrides.njk
5 | ---
6 | <%= title %>
--------------------------------------------------------------------------------
/test/stubs/overrides/page-templatesyntax.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk,md
3 | ---
4 |
5 | {{ page.templateSyntax }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-bypass.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk
3 | title: My Title
4 | ---
5 |
6 | # {{ title }}
7 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-empty.html:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride:
3 | title: My Title
4 | ---
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-empty.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride:
3 | title: My Title
4 | ---
5 |
6 | # {{ title }}
7 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-error.njk:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: liquid,njk
3 | title: My Title
4 | ---
5 | # {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-md.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: md
3 | ---
4 | # My Title
5 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-multiple.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk,md
3 | title: My Title
4 | ---
5 |
6 | # {{ title }}
7 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-multiple2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: liquid,md
3 | title: My Title
4 | ---
5 | # {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test-njk.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk
3 | title: My Title
4 | ---
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test.html:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk
3 | title: My Title
4 | ---
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | templateEngineOverride: njk
3 | title: My Title
4 | ---
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/test/stubs/overrides/test.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: My Title
3 | layout: layouts/engineOverridesMd.njk
4 | ---
5 |
6 | # {{ title }}
7 |
--------------------------------------------------------------------------------
/test/stubs/page-target-collections/paginateall.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.all
4 | size: 1
5 | alias: entry
6 | filter:
7 | - all
8 | addAllPagesToCollections: true
9 | ---
10 | INPUT PATH:{{ entry.inputPath }}
--------------------------------------------------------------------------------
/test/stubs/page-target-collections/tagpages.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections
4 | size: 1
5 | alias: tag
6 | filter:
7 | - all
8 | ---
9 |
10 | {{ tag }}
--------------------------------------------------------------------------------
/test/stubs/page-target-collections/tagpagesall.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections
4 | size: 1
5 | alias: tag
6 | filter:
7 | - all
8 | addAllPagesToCollections: true
9 | ---
10 |
11 | {{ tag }}
--------------------------------------------------------------------------------
/test/stubs/paged-global-data-mutable/_data/testdata.cjs:
--------------------------------------------------------------------------------
1 | module.exports = [
2 | {
3 | key1: "item1",
4 | key2: "item2",
5 | },
6 | {
7 | key3: "item3",
8 | key4: "item4",
9 | },
10 | {
11 | key5: "item5",
12 | key6: "item6",
13 | },
14 | ];
15 |
--------------------------------------------------------------------------------
/test/stubs/paged-global-data-mutable/paged-differing-data-set.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 1
5 | alias: item
6 | ---
7 | 1:{{ item.key1 }}
8 | 2:{{ item.key2 }}
9 | 3:{{ item.key3 }}
10 | 4:{{ item.key4 }}
11 | 5:{{ item.key5 }}
12 | 6:{{ item.key6 }}
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/consumer.njk:
--------------------------------------------------------------------------------
1 | {% for item in collections.pagingtag %}{{ item.templateContent | safe }}{% endfor %}
2 |
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/paged-downstream.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.pagingtag
4 | size: 1
5 | ---
6 | {% for item in pagination.items %}- {{ item.url }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/paged-main.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.tag1
4 | size: 2
5 | addAllPagesToCollections: true
6 | tags:
7 | - pagingtag
8 | ---
9 | {% for item in pagination.items %}- {{ item.url }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/test1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 1
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/test2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 2
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/cfg-collection-tag-cfg-collection/test3.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 3
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection-apply-to-all/consumer.njk:
--------------------------------------------------------------------------------
1 | {% for item in collections.pagingtag %}{{ item.templateContent | safe }}{% endfor %}
2 |
--------------------------------------------------------------------------------
/test/stubs/paged/collection-apply-to-all/main.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.tag1
4 | size: 2
5 | addAllPagesToCollections: true
6 | tags:
7 | - pagingtag
8 | ---
9 | {% for item in pagination.items %}- {{ item.url }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/collection-apply-to-all/test1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 1
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection-apply-to-all/test2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 2
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection-apply-to-all/test3.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 3
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection/consumer.njk:
--------------------------------------------------------------------------------
1 | {% for item in collections.pagingtag %}{{ item.templateContent | safe }}{% endfor %}
2 |
--------------------------------------------------------------------------------
/test/stubs/paged/collection/main.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.tag1
4 | size: 2
5 | tags:
6 | - pagingtag
7 | ---
8 | {% for item in pagination.items %}- {{ item.url }}
{% endfor %}
9 |
--------------------------------------------------------------------------------
/test/stubs/paged/collection/test1.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 1
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection/test2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 2
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/collection/test3.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Testing 3
3 | tags:
4 | - tag1
5 | ---
6 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/paged/notpaged.njk:
--------------------------------------------------------------------------------
1 | ---
2 | testdata:
3 | sub:
4 | - item1
5 | - item2
6 | - item3
7 | - item4
8 | - item5
9 | - item6
10 | - item7
11 | - item8
12 | ---
13 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
14 |
--------------------------------------------------------------------------------
/test/stubs/paged/paged-before-and-reverse.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | pagination: {
4 | data: "items",
5 | size: 1,
6 | reverse: true,
7 | before: function(data) {
8 | return data.slice(0, 2);
9 | }
10 | },
11 | items: ["item1", "item2", "item3", "item4", "item5", "item6"]
12 | }
13 | ---
14 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/paged-before-filter.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | pagination: {
4 | data: "items",
5 | size: 1,
6 | before: function(data) {
7 | return data.slice(0, 2).reverse();
8 | },
9 | alias: "myalias"
10 | },
11 | items: ["item1", "item2", "item3", "item4", "item5", "item6"]
12 | }
13 | ---
14 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/paged-before-metadata.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | keyword: "item3",
4 | pagination: {
5 | data: "items",
6 | size: 1,
7 | before: function(data, metadata) {
8 | return data.filter(el => el === metadata.keyword);
9 | }
10 | },
11 | items: ["item1", "item2", "item3", "item4", "item5", "item6"]
12 | }
13 | ---
14 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
15 |
--------------------------------------------------------------------------------
/test/stubs/paged/paged-before.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | pagination: {
4 | data: "items",
5 | size: 1,
6 | before: function(data) {
7 | return data.reverse();
8 | },
9 | alias: 'myalias'
10 | },
11 | items: ["item1", "item2", "item3", "item4", "item5", "item6"]
12 | }
13 | ---
14 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/paged-empty-pageonemptydata.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 1
5 | generatePageOnEmptyData: true
6 | items: []
7 | ---
8 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
9 |
--------------------------------------------------------------------------------
/test/stubs/paged/paged-empty.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 1
5 | items: []
6 | ---
7 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
8 |
--------------------------------------------------------------------------------
/test/stubs/paged/paged.json:
--------------------------------------------------------------------------------
1 | {
2 | "items": {
3 | "sub": [
4 | "item1",
5 | "item2",
6 | "item3",
7 | "item4",
8 | "item5",
9 | "item6",
10 | "item7",
11 | "item8"
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/test/stubs/paged/paged.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items.sub
4 | size: 5
5 | ---
6 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
7 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedalias.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 1
5 | alias: font.test
6 | items:
7 | - item1
8 | - item2
9 | permalink: pagedalias/{{ font.test }}/index.html
10 | ---
11 | {{ font.test }}
12 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedaliassize2.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 2
5 | alias: font.test
6 | items:
7 | - item1
8 | - item2
9 | - item3
10 | - item4
11 | permalink: pagedalias/{{ font.test[0] }}/index.html
12 | ---
13 | {{ font.test[0] }}
14 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedinlinedata-reverse.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | reverse: true
6 | testdata:
7 | - item1
8 | - item2
9 | - item3
10 | - item4
11 | - item5
12 | - item6
13 | - item7
14 | - item8
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
--------------------------------------------------------------------------------
/test/stubs/paged/pagedinlinedata.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | testdata:
6 | - item1
7 | - item2
8 | - item3
9 | - item4
10 | - item5
11 | - item6
12 | - item7
13 | - item8
14 | ---
15 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
16 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedobject.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | testdata:
6 | item1: itemvalue1
7 | item2: itemvalue2
8 | item3: itemvalue3
9 | item4: itemvalue4
10 | item5: itemvalue5
11 | item6: itemvalue6
12 | item7: itemvalue7
13 | item8: itemvalue8
14 | item9: itemvalue9
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
17 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedobjectfilterarray.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | filter:
6 | - item4
7 | testdata:
8 | item1: itemvalue1
9 | item2: itemvalue2
10 | item3: itemvalue3
11 | item4: itemvalue4
12 | item5: itemvalue5
13 | item6: itemvalue6
14 | item7: itemvalue7
15 | item8: itemvalue8
16 | item9: itemvalue9
17 | ---
18 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
19 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedobjectfilterstring.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | filter: item4
6 | testdata:
7 | item1: itemvalue1
8 | item2: itemvalue2
9 | item3: itemvalue3
10 | item4: itemvalue4
11 | item5: itemvalue5
12 | item6: itemvalue6
13 | item7: itemvalue7
14 | item8: itemvalue8
15 | item9: itemvalue9
16 | ---
17 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
18 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedobjectvalues.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | resolve: values
6 | testdata:
7 | item1: itemvalue1
8 | item2: itemvalue2
9 | item3: itemvalue3
10 | item4: itemvalue4
11 | item5: itemvalue5
12 | item6: itemvalue6
13 | item7: itemvalue7
14 | item8: itemvalue8
15 | item9: itemvalue9
16 | ---
17 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
18 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedpermalink.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 5
5 | items:
6 | - Slug CANDIDATE
7 | - item2
8 | - item3
9 | - item4
10 | - item5
11 | - another-slug CandiDate
12 | - item7
13 | - item8
14 | permalink: paged/{{ pagination.items[0] | slugify }}/index.html
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
17 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedpermalinkif.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 2
5 | items:
6 | - item1
7 | - item2
8 | - item3
9 | - item4
10 | permalink: paged/{% if pagination.pageNumber > 0 %}page-{{ pagination.pageNumber }}/{% endif %}index.html
11 | ---
12 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
13 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedpermalinkif.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 2
5 | items:
6 | - item1
7 | - item2
8 | - item3
9 | - item4
10 | permalink: paged/{% if pagination.pageNumber > 0 %}page-{{ pagination.pageNumber }}/{% endif %}index.html
11 | ---
12 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
13 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedpermalinknumeric.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 5
5 | items:
6 | - Slug CANDIDATE
7 | - item2
8 | - item3
9 | - item4
10 | - item5
11 | - another-slug CandiDate
12 | - item7
13 | - item8
14 | permalink: paged/page-{{ pagination.pageNumber }}/index.html
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
17 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedpermalinknumericoneindexed.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: items
4 | size: 5
5 | items:
6 | - Slug CANDIDATE
7 | - item2
8 | - item3
9 | - item4
10 | - item5
11 | - another-slug CandiDate
12 | - item7
13 | - item8
14 | permalink: paged/page-{{ pagination.pageNumber + 1 }}/index.html
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
17 |
--------------------------------------------------------------------------------
/test/stubs/paged/pagedresolve.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata.sub
4 | size: 4
5 | testdata:
6 | sub:
7 | - item1
8 | - item2
9 | - item3
10 | - item4
11 | - item5
12 | - item6
13 | - item7
14 | - item8
15 | ---
16 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
17 |
--------------------------------------------------------------------------------
/test/stubs/pagedate.liquid:
--------------------------------------------------------------------------------
1 | {{ page.date }}
--------------------------------------------------------------------------------
/test/stubs/pagedate.njk:
--------------------------------------------------------------------------------
1 | {{ page.date }}
--------------------------------------------------------------------------------
/test/stubs/pagedateutc.njk:
--------------------------------------------------------------------------------
1 | {{ page.date.toUTCString() }}
--------------------------------------------------------------------------------
/test/stubs/pagination-eleventycomputed-permalink.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | venues:
3 | - first
4 | - second
5 | - third
6 | pagination:
7 | data: venues
8 | size: 1
9 | alias: venue
10 | addAllPagesToCollections: true
11 | eleventyComputed:
12 | permalink: "venues/{{ venue }}/"
13 | ---
14 |
--------------------------------------------------------------------------------
/test/stubs/pagination-eleventycomputed-title.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | venues:
3 | - id: 1
4 | name: first
5 | - id: 2
6 | name: second
7 | - id: 3
8 | name: third
9 | randommetadata: "woopers"
10 | pagination:
11 | data: venues
12 | size: 1
13 | alias: venue
14 | eleventyComputed:
15 | title: "website - {{ venue.name }}"
16 | ---
17 |
18 | {{ venue.name }}
19 |
20 | {{ randommetadata }}
21 |
--------------------------------------------------------------------------------
/test/stubs/pagination-templatecontent/index.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: collections.post
4 | size: 5
5 | alias: posts
6 | ---
7 | {%- for post in posts -%}
8 | {{ post.templateContent | safe }}
9 | {%- endfor -%}
--------------------------------------------------------------------------------
/test/stubs/pagination-templatecontent/post-1.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | ---
5 |
6 | # Post 1
7 |
--------------------------------------------------------------------------------
/test/stubs/pagination-templatecontent/post-2.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - post
4 | ---
5 |
6 | # Post 2
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-build/permalink-build.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink:
3 | build: /url/
4 | ---
5 |
6 | This should be the same as `permalink: /url/`
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-conflicts-false/test1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | permalink: false
7 | ---
8 |
9 | # Test 1
10 |
--------------------------------------------------------------------------------
/test/stubs/permalink-conflicts-false/test2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | permalink: false
7 | ---
8 |
9 | # Test 2
10 |
--------------------------------------------------------------------------------
/test/stubs/permalink-conflicts/test1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | permalink: /permalink-conflicts/
7 | ---
8 |
9 | # Test 1
10 |
--------------------------------------------------------------------------------
/test/stubs/permalink-conflicts/test2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | permalink: /permalink-conflicts/
7 | ---
8 |
9 | # Test 2
10 |
--------------------------------------------------------------------------------
/test/stubs/permalink-conflicts/test3.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | permalink: permalink-conflicts/
7 | ---
8 |
9 | # Test 3
10 |
--------------------------------------------------------------------------------
/test/stubs/permalink-data-layout/test.json:
--------------------------------------------------------------------------------
1 | {
2 | "layout": "permalink-data-layout.njk"
3 | }
--------------------------------------------------------------------------------
/test/stubs/permalink-data-layout/test.njk:
--------------------------------------------------------------------------------
1 | Test 1:{{ page.fileSlug }}
--------------------------------------------------------------------------------
/test/stubs/permalink-empty-object/empty-object.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: {}
3 | ---
4 |
5 | This should be the same as if permalink was not set at all.
6 |
--------------------------------------------------------------------------------
/test/stubs/permalink-false-computed/test.md:
--------------------------------------------------------------------------------
1 | ---
2 | eleventyComputed:
3 | permalink: false
4 | ---
5 |
6 | This shouldn’t write
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-false/test.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: false
3 | ---
4 |
5 | This shouldn’t write
6 |
--------------------------------------------------------------------------------
/test/stubs/permalink-in-layout-fileslug.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: permalink-in-layout/layout-fileslug.liquid
3 | ---
4 | Current url: {{ permalink }}
--------------------------------------------------------------------------------
/test/stubs/permalink-in-layout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: permalink-in-layout/layout.liquid
3 | ---
4 | Current url: {{ permalink }}
--------------------------------------------------------------------------------
/test/stubs/permalink-markdown-override.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: My Title
3 | permalink: /news/my-test-file/index.html
4 | templateEngineOverride: html,md
5 | ---
6 |
7 | # <%= title %>
8 |
--------------------------------------------------------------------------------
/test/stubs/permalink-markdown-var.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: My Title
3 | permalink: /news/{{ title | slugify }}/index.html
4 | ---
5 |
6 | # <%= title %>
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-markdown.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: My Title
3 | permalink: /news/my-test-file/index.html
4 | ---
5 |
6 | # <%= title %>
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-nobuild/permalink-nobuild.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink:
3 | someotherkey: /url/
4 | ---
5 |
6 | This shouldn’t write to the file system or be rendered by a template engine.
7 |
--------------------------------------------------------------------------------
/test/stubs/permalink-true/permalink-true.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: true
3 | ---
4 |
5 | This should throw an error.
6 |
--------------------------------------------------------------------------------
/test/stubs/permalinkdata-jsfn.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | title: "slug",
4 | permalink: "subdir/{{title}}/"
5 | }
6 | ---
7 | Slugged.
8 |
--------------------------------------------------------------------------------
/test/stubs/permalinkdata-jspermalinkfn.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | title: "slug",
4 | permalink: function(data) {
5 | return `subdir/${data.title}/`;
6 | }
7 | }
8 | ---
9 | Slugged.
10 |
--------------------------------------------------------------------------------
/test/stubs/permalinkdata.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Slug CANDIDATE
3 | permalink: subdir/{{ title | slugify }}/index.html
4 | ---
5 | Slugged.
6 |
--------------------------------------------------------------------------------
/test/stubs/permalinkdate.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Date Permalink
3 | date: "2016-01-01T06:00-06:00"
4 | permalink: "/{{ page.date | date: '%Y/%m/%d' }}/index.html"
5 | ---
6 | Date Permalinks
--------------------------------------------------------------------------------
/test/stubs/permalinked.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: permalinksubfolder/index.html
3 | ---
4 | Current url: {{ permalink }}
--------------------------------------------------------------------------------
/test/stubs/posts/post1.njk:
--------------------------------------------------------------------------------
1 | Post1
2 |
--------------------------------------------------------------------------------
/test/stubs/posts/posts.json:
--------------------------------------------------------------------------------
1 | {
2 | "layout": "mylocallayout.njk"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs/posts/posts.njk:
--------------------------------------------------------------------------------
1 | Posts
2 |
--------------------------------------------------------------------------------
/test/stubs/prematureTemplateContent/test.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function(data) {
2 | return data.collections.all[0].templateContent;
3 | };
4 |
--------------------------------------------------------------------------------
/test/stubs/prematureTemplateContent/test.liquid:
--------------------------------------------------------------------------------
1 | {{ collections.all[0].templateContent }}
--------------------------------------------------------------------------------
/test/stubs/prematureTemplateContent/test.md:
--------------------------------------------------------------------------------
1 | {{ sample.templateContent }}
2 |
--------------------------------------------------------------------------------
/test/stubs/prematureTemplateContent/test.njk:
--------------------------------------------------------------------------------
1 | {{ sample.templateContent }}
--------------------------------------------------------------------------------
/test/stubs/promise.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = new Promise((resolve, reject) => {
2 | setTimeout(function() {
3 | resolve("Zach
");
4 | }, 100);
5 | });
6 |
--------------------------------------------------------------------------------
/test/stubs/public/test.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/public/test.css
--------------------------------------------------------------------------------
/test/stubs/relative-liquid/dir/included.liquid:
--------------------------------------------------------------------------------
1 | TIME IS RELATIVE.
--------------------------------------------------------------------------------
/test/stubs/reuse-permalink/reuse-permalink.json:
--------------------------------------------------------------------------------
1 | {
2 | "permalink": "/{{ page.date | date: '%Y/%m/%d' }}/index.html"
3 | }
4 |
--------------------------------------------------------------------------------
/test/stubs/reuse-permalink/test1.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | date: "2016-01-01T06:00-06:00"
4 | ---
5 |
6 | # Test 1
7 |
--------------------------------------------------------------------------------
/test/stubs/script-frontmatter/test-default.njk:
--------------------------------------------------------------------------------
1 | ---
2 | import {noopSync} from "@zachleat/noop";
3 | const myString = "Hi";
4 |
5 | // export a function
6 | function myFunction() { return "Bye" }
7 | ---
8 | {{ noopSync(myString) }}
{{ myFunction() }}
--------------------------------------------------------------------------------
/test/stubs/script-frontmatter/test-js.njk:
--------------------------------------------------------------------------------
1 | ---javascript
2 | {
3 | myFunction: function() {
4 | return "HELLO!";
5 | }
6 | }
7 | ---
8 | {{ myFunction() }}
--------------------------------------------------------------------------------
/test/stubs/script-frontmatter/test.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | import {noopSync} from "@zachleat/noop";
3 | const myString = "Hi";
4 |
5 | // export a function
6 | function myFunction() { return "Bye" }
7 | ---
8 | {{ noopSync(myString) }}
{{ myFunction() }}
--------------------------------------------------------------------------------
/test/stubs/string.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/string.11ty.custom:
--------------------------------------------------------------------------------
1 | export default "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/string.11ty.possum:
--------------------------------------------------------------------------------
1 | export default "Possum
";
2 |
--------------------------------------------------------------------------------
/test/stubs/stubs-computed-permalink/eleventycomputed-nested-object.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | lang: "en",
3 | eleventyComputed: {
4 | permalink: function (data) {
5 | // console.log(">>>>", { data });
6 | return {
7 | build: `/i18n/${data.lang}/`,
8 | };
9 | },
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/test/stubs/stubs-computed-permalink/eleventycomputed-object-replace.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | lang: "en",
3 | permalink: "/i18n/{{lang}}/",
4 | eleventyComputed: {
5 | permalink: function (data) {
6 | return {
7 | build: data.permalink.replace("{{lang}}", "en"),
8 | };
9 | },
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/test/stubs/stubs-computed-permalink/eleventycomputed-object.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports.data = {
2 | lang: "en",
3 | eleventyComputed: {
4 | permalink: {
5 | build: function (data) {
6 | return `/i18n/${data.lang}/`;
7 | },
8 | },
9 | },
10 | };
11 |
--------------------------------------------------------------------------------
/test/stubs/stubs-virtual-conflict/virtual.md:
--------------------------------------------------------------------------------
1 | # This is on the file system
--------------------------------------------------------------------------------
/test/stubs/subdir/img/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/subdir/img/.gitkeep
--------------------------------------------------------------------------------
/test/stubs/subdir/index.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/subdir/index.html
--------------------------------------------------------------------------------
/test/stubs/subfolder/index.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/subfolder/index.html
--------------------------------------------------------------------------------
/test/stubs/subfolder/subfolder.liquid:
--------------------------------------------------------------------------------
1 | subfolder
--------------------------------------------------------------------------------
/test/stubs/subfolder/subfolder/subfolder.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/subfolder/subfolder/subfolder.liquid
--------------------------------------------------------------------------------
/test/stubs/tagged-pagination-multiples-layout/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | layout: layouts/div-wrapper-layout.njk
4 | testdata:
5 | - one
6 | - two
7 | - three
8 | pagination:
9 | data: testdata
10 | size: 1
11 | alias: item
12 | addAllPagesToCollections: true
13 | ---
14 | {{ item }}
--------------------------------------------------------------------------------
/test/stubs/tagged-pagination-multiples/test.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | tags:
4 | - haha
5 | pagination:
6 | data: collections.userCollection
7 | size: 1
8 | alias: item
9 | addAllPagesToCollections: true
10 | ---
11 |
12 | {{ title }}
--------------------------------------------------------------------------------
/test/stubs/template-passthrough-duplicates/input/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough-duplicates/input/avatar.png
--------------------------------------------------------------------------------
/test/stubs/template-passthrough-duplicates/input/src/views/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough-duplicates/input/src/views/avatar.png
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/.htaccess:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/.htaccess
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/img.jpg
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/src/views/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/src/views/avatar.png
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/static/nested/test-nested.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/static/nested/test-nested.css
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/static/test.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/static/test.css
--------------------------------------------------------------------------------
/test/stubs/template-passthrough/static/test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough/static/test.js
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/.htaccess:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/.htaccess
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/img.jpg
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/src/views/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/src/views/avatar.png
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/static/nested/test-nested.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/static/nested/test-nested.css
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/static/test.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/static/test.css
--------------------------------------------------------------------------------
/test/stubs/template-passthrough2/static/test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template-passthrough2/static/test.js
--------------------------------------------------------------------------------
/test/stubs/template.liquid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/stubs/template.liquid
--------------------------------------------------------------------------------
/test/stubs/templateFrontMatter.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | key1: value1
3 | key2: value2
4 | key3: value3
5 | ---
6 | c:{{ key1 }}:{{ key2 }}:{{ key3 }}
--------------------------------------------------------------------------------
/test/stubs/templateFrontMatterJs.njk:
--------------------------------------------------------------------------------
1 | ---js
2 | {
3 | key1: "value1",
4 | key2: function(value) {
5 | return value.toUpperCase();
6 | },
7 | key3: "value3"
8 | }
9 | ---
10 | c:{{ key1 }}:{{ key2("value2") }}:{{ key3 }}
11 |
--------------------------------------------------------------------------------
/test/stubs/templateFrontMatterJson.liquid:
--------------------------------------------------------------------------------
1 | ---json
2 | {
3 | "key1": "value1",
4 | "key2": "value2",
5 | "key3": "value3"
6 | }
7 | ---
8 | c:{{ key1 }}:{{ key2 }}:{{ key3 }}
--------------------------------------------------------------------------------
/test/stubs/templateLayoutCacheDuplicates-b/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | Hello B
--------------------------------------------------------------------------------
/test/stubs/templateLayoutCacheDuplicates/_includes/layout.njk:
--------------------------------------------------------------------------------
1 | Hello A
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg-permalink.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | pagination:
4 | data: collections.userCollection
5 | size: 1
6 | alias: item
7 | permalink: /{{ item.data.title | slugify }}/hello/
8 | ---
9 |
10 | # {{ title }}
11 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg-tagged-apply-to-all.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | tags:
4 | - haha
5 | pagination:
6 | data: collections.userCollection
7 | size: 1
8 | alias: item
9 | addAllPagesToCollections: true
10 | ---
11 |
12 | # {{ title }}
13 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg-tagged-permalink-apply-to-all.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | tags:
4 | - haha
5 | pagination:
6 | data: collections.userCollection
7 | size: 1
8 | alias: item
9 | addAllPagesToCollections: true
10 | permalink: /{{ item.data.title | slugify }}/goodbye/
11 | ---
12 |
13 | # {{ title }}
14 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg-tagged-permalink.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | tags:
4 | - haha
5 | pagination:
6 | data: collections.userCollection
7 | size: 1
8 | alias: item
9 | permalink: /{{ item.data.title | slugify }}/goodbye/
10 | ---
11 |
12 | # {{ title }}
13 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg-tagged.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | tags:
4 | - haha
5 | pagination:
6 | data: collections.userCollection
7 | size: 1
8 | alias: item
9 | ---
10 |
11 | # {{ title }}
12 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-cfg.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | pagination:
4 | data: collections.userCollection
5 | size: 1
6 | ---
7 |
8 | # {{ title }}
9 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-tag-dogs-templateContent-alias.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | pagination:
4 | data: collections.dog
5 | size: 2
6 | alias: dogs
7 | ---
8 |
9 | Before
10 | {% for dog in dogs %}
11 | {{ dog.templateContent }}
12 | {% endfor %}
13 | After
14 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-tag-dogs-templateContent.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | pagination:
4 | data: collections.dog
5 | size: 1
6 | ---
7 |
8 | Before
9 | {% for dog in pagination.items %}
10 | {{ dog.templateContent }}
11 | {% endfor %}
12 | After
13 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/paged-tag.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Paged Test
3 | pagination:
4 | data: collections.dog
5 | size: 1
6 | ---
7 |
8 | # {{ title }}
9 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/templateContent.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: circle
3 | ---
4 |
5 | # Test
6 |
7 | {{ collections.circle[0].templateContent }}
8 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/test1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title
3 | tags:
4 | - post
5 | - dog
6 | ---
7 |
8 | # Test 1
9 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/test2.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: cat
3 | ---
4 |
5 | # Test 2
6 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/test3.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags: circle
3 | ---
4 |
5 | # {{ collections.circle.length }}, {{ collections.circle[0].url }}
6 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/test4.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title 4
3 | tags:
4 | - post
5 | - dog
6 | ---
7 |
8 | # Test 4
9 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/test5.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Title 5
3 | ---
4 |
5 | # Test 5
6 |
--------------------------------------------------------------------------------
/test/stubs/templateMapCollection/testWithLayout.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/templateMapCollection.njk
3 | ---
4 |
5 | {{ upstream }}
6 |
--------------------------------------------------------------------------------
/test/stubs/templateTwoLayouts.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout-a
3 | key1: value1
4 | title: 'Font Aliasing, or How to Rename a Font in CSS'
5 | permalink: /rename-font/
6 | postRank: 4
7 | daysPosted: 152
8 | yearsPosted: 0.4
9 | ---
10 |
11 | {{ upstream }}
--------------------------------------------------------------------------------
/test/stubs/templateWithLayout.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layoutLiquid.liquid
3 | keymain: valuemain
4 | title: 'Font Aliasing, or How to Rename a Font in CSS'
5 | permalink: /rename-font/
6 | ---
7 |
8 | Hello.
--------------------------------------------------------------------------------
/test/stubs/templateWithLayoutContent.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: defaultLayoutLayoutContent
3 | keymain: valuemain
4 | title: 'Font Aliasing, or How to Rename a Font in CSS'
5 | permalink: /rename-font/
6 | ---
7 | Hello.
8 |
--------------------------------------------------------------------------------
/test/stubs/templateWithLayoutKey.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: defaultLayout
3 | keymain: valuemain
4 | title: 'Font Aliasing, or How to Rename a Font in CSS'
5 | permalink: /rename-font/
6 | ---
7 |
8 | Hello.
--------------------------------------------------------------------------------
/test/stubs/templatetest-frontmatter/multiple.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - multi-tag
4 | - multi-tag-2
5 | ---
6 | {% if tags.includes("multi-tag-2") %}Has multi-tag-2{% endif %}
--------------------------------------------------------------------------------
/test/stubs/templatetest-frontmatter/single.njk:
--------------------------------------------------------------------------------
1 | ---
2 | tags: single-tag
3 | ---
4 | {% if tags.includes("single-tag") %}Has single-tag{% endif %}
--------------------------------------------------------------------------------
/test/stubs/test-override-js-markdown.11ty.cjs:
--------------------------------------------------------------------------------
1 | class Test {
2 | data() {
3 | return {
4 | name: "markdown",
5 | templateEngineOverride: "11ty.js,md"
6 | };
7 | }
8 |
9 | render(data) {
10 | return `# This is ${data.name}`;
11 | }
12 | }
13 |
14 | module.exports = Test;
15 |
--------------------------------------------------------------------------------
/test/stubs/testing.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | This is an html template.
4 |
5 |
--------------------------------------------------------------------------------
/test/stubs/transform-pages/template.njk:
--------------------------------------------------------------------------------
1 | ---
2 | pagination:
3 | data: testdata
4 | size: 4
5 | testdata:
6 | - item1
7 | - item2
8 | - item3
9 | - item4
10 | - item5
11 | - item6
12 | - item7
13 | - item8
14 | ---
15 | {% for item in pagination.items %}- {{ item }}
{% endfor %}
16 |
--------------------------------------------------------------------------------
/test/stubs/use-collection.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function({ collections }) {
2 | return `${collections.post
3 | .map(post => `- ${post.data.title}
`)
4 | .join("")}
`;
5 | };
6 |
--------------------------------------------------------------------------------
/test/stubs/vue.11ty.cjs:
--------------------------------------------------------------------------------
1 | const { createSSRApp } = require("vue");
2 | const { renderToString } = require("@vue/server-renderer");
3 |
4 | module.exports = async function (templateData) {
5 | var app = createSSRApp({
6 | template: "Hello {{ data.name }}, this is a Vue template.
",
7 | data: function () {
8 | return {
9 | data: templateData,
10 | };
11 | },
12 | // components: {
13 | // 'test': ComponentA
14 | // }
15 | });
16 |
17 | return renderToString(app);
18 | };
19 |
--------------------------------------------------------------------------------
/test/stubs/writeTest/test.md:
--------------------------------------------------------------------------------
1 | # Header
--------------------------------------------------------------------------------
/test/stubs/writeTestJS-casesensitive/sample.Js:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestJS-casesensitive/test.11Ty.js:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestJS-passthrough/sample.js:
--------------------------------------------------------------------------------
1 | export default "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestJS-passthrough/test.11ty.js:
--------------------------------------------------------------------------------
1 | export default "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestJS/sample.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestJS/test.11ty.cjs:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestMarkdown/sample.md:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/stubs/writeTestMarkdown/sample2.markdown:
--------------------------------------------------------------------------------
1 | module.exports = "Zach
";
2 |
--------------------------------------------------------------------------------
/test/views/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test/views/.gitkeep
--------------------------------------------------------------------------------
/test_node/3824-incremental/_includes/head.tsx:
--------------------------------------------------------------------------------
1 | import { Page } from "./ViewProps.js";
2 |
3 | export type HeadProps = {
4 | page: Page
5 | };
6 |
7 | export function Head(props: HeadProps): JSX.Element {
8 | return
9 | My test page
10 | ;
11 | }
--------------------------------------------------------------------------------
/test_node/3824-incremental/_includes/view-props.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test_node/3824-incremental/_includes/view-props.tsx
--------------------------------------------------------------------------------
/test_node/3824-incremental/index.11ty.tsx:
--------------------------------------------------------------------------------
1 | import { Head } from "./_includes/head.tsx";
2 | import { Page, ViewProps } from "./_includes/viewprops.tsx";
3 |
4 |
5 | export type IndexProps = {
6 | children?: JSX.Element;
7 | page: Page
8 | };
9 |
10 | export function Index(props: IndexProps): JSX.Element {
11 | return
12 |
13 |
14 | Hello World
15 |
16 | ;
17 | }
18 |
19 | export function render(props: ViewProps): JSX.Element {
20 | return ;
21 | }
22 |
--------------------------------------------------------------------------------
/test_node/3824-incremental/tsconfig-3824.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2016",
4 | "jsx": "react-jsx",
5 | "jsxImportSource": "jsx-async-runtime",
6 | "module": "NodeNext",
7 | "outDir": "dist",
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "strict": true,
11 | "skipLibCheck": true
12 | },
13 | "exclude": [ "node_modules", "_site" ]
14 | }
15 |
--------------------------------------------------------------------------------
/test_node/3824/_includes/head.tsx:
--------------------------------------------------------------------------------
1 | import { Page } from "./ViewProps.js";
2 |
3 | export type HeadProps = {
4 | page: Page
5 | };
6 |
7 | export function Head(props: HeadProps): JSX.Element {
8 | return
9 | My test page
10 | ;
11 | }
--------------------------------------------------------------------------------
/test_node/3824/_includes/view-props.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/11ty/eleventy/0c89371802c45dcdc635c797192ccd2ad96693c9/test_node/3824/_includes/view-props.tsx
--------------------------------------------------------------------------------
/test_node/3824/index.11ty.tsx:
--------------------------------------------------------------------------------
1 | import { Head } from "./_includes/head.tsx";
2 | import { Page, ViewProps } from "./_includes/viewprops.tsx";
3 |
4 |
5 | export type IndexProps = {
6 | children?: JSX.Element;
7 | page: Page
8 | };
9 |
10 | export function Index(props: IndexProps): JSX.Element {
11 | return
12 |
13 |
14 | Hello World
15 |
16 | ;
17 | }
18 |
19 | export function render(props: ViewProps): JSX.Element {
20 | return ;
21 | }
22 |
--------------------------------------------------------------------------------
/test_node/3824/tsconfig-3824.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2016",
4 | "jsx": "react-jsx",
5 | "jsxImportSource": "jsx-async-runtime",
6 | "module": "NodeNext",
7 | "outDir": "dist",
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "strict": true,
11 | "skipLibCheck": true
12 | },
13 | "exclude": [ "node_modules", "_site" ]
14 | }
15 |
--------------------------------------------------------------------------------
/test_node/README.md:
--------------------------------------------------------------------------------
1 | # test_node Unit Tests
2 |
3 | This folder is for tests using the [official Node Test Runner](https://nodejs.org/api/test.html). It was originally introduced to workaround issues with `tsx` and `@mdx-js/node-loader` using worker threads (not supported by the existing test runner, [ava](https://github.com/avajs/ava)). We’re using this instead of `--no-worker-threads` with a separate `ava` run.
4 |
--------------------------------------------------------------------------------
/test_node/tests.js:
--------------------------------------------------------------------------------
1 | import "./JsxTest.js";
2 | import "./MdxTest.js";
3 | import "./3824/3824-test.js";
4 | import "./3824-incremental/3824-incremental-test.js";
5 |
--------------------------------------------------------------------------------