-
Notifications
You must be signed in to change notification settings - Fork 106
docs: moving documentation to 11ty #1421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
276bf9a
docs: moving docs to 11ty
kylebuch8 0149233
Branch was auto-updated with the latest.
github-actions[bot] 3a0cb98
updating to v1.3.3 of PatternFly Elements
kylebuch8 719c09d
updating documentation footer link
kylebuch8 d67f949
Update README.md
castastrophe 847de97
fork: 11ty updates; scripting assist (#1508)
castastrophe ee2dea4
Merge branch 'master' into updated-site
kylebuch8 bef804d
Merge branch 'master' into updated-site
kylebuch8 e26359d
Alias deploy-docs script to build-docs
castastrophe 38ba3c5
Ignore node_modules on the docs directory
castastrophe 483acee
Branch was auto-updated with the latest.
github-actions[bot] 0cac08e
Branch was auto-updated with the latest.
github-actions[bot] 5fd4b1a
Branch was auto-updated with the latest.
github-actions[bot] d7827c9
Branch was auto-updated with the latest.
github-actions[bot] 24932a4
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe 5c0f1d0
Merge branch 'master' into updated-site
castastrophe b16bac1
Branch was auto-updated with the latest.
github-actions[bot] 460aba4
Merge branch 'master' into updated-site
castastrophe 9034fb7
Branch was auto-updated with the latest.
github-actions[bot] 56598c2
Add storybook assets to the publish directory; update spandx localhos…
castastrophe 93fdc85
Resolve assets missing from site during build
castastrophe f8f8265
Update reference to brand assets
castastrophe 5a8040e
Update package to resolve warnings in console
castastrophe 03b39b7
Update all demo pages to source requirejs from a cdn instead of as a …
castastrophe 5c46aaa
Update node modules references to use locally built components
castastrophe 35e0028
Updating referencing to CDNs
castastrophe f9c0207
Remove travis config
castastrophe f000cb0
Remove storybook copy as it's built to the docs directory now
castastrophe fce4b2e
Branch was auto-updated with the latest.
github-actions[bot] 740eb4e
Branch was auto-updated with the latest.
github-actions[bot] 9679268
Branch was auto-updated with the latest.
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| demo: | ||
| - examples/* | ||
| - elements/*/demo/* | ||
|
|
||
| generator: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| let compress = require("compression"); | ||
| let markdownIt = require("markdown-it"); | ||
| let markdownItAnchor = require("markdown-it-anchor"); | ||
| let markdownItContainer = require("markdown-it-container"); | ||
|
|
||
| module.exports = function (eleventyConfig) { | ||
| /** | ||
| * Collections to organize by alphabetical instead of date | ||
| */ | ||
| const tagsToAlphabetize = [ | ||
| 'component' | ||
| ]; | ||
|
|
||
| for (let i = 0; i < tagsToAlphabetize.length; i++) { | ||
| const tag = tagsToAlphabetize[i]; | ||
|
|
||
| eleventyConfig.addCollection(tag, collection => { | ||
| return collection.getFilteredByTag(tag).sort((a, b) => { | ||
| if (a.data.title < b.data.title) { return -1; } | ||
| if (a.data.title > b.data.title) { return 1; } | ||
| return 0; | ||
| }); | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Collections to organize by order instead of date | ||
| */ | ||
| const tagsToOrderByOrder = [ | ||
| "develop" | ||
| ]; | ||
|
|
||
| for (let i = 0; i < tagsToOrderByOrder.length; i++) { | ||
| const tag = tagsToOrderByOrder[i]; | ||
|
|
||
| eleventyConfig.addCollection(tag, collection => { | ||
| return collection.getFilteredByTag(tag).sort((a, b) => a.data.order - b.data.order); | ||
| }); | ||
| } | ||
|
|
||
| eleventyConfig.setTemplateFormats([ | ||
| "html", | ||
| "md", | ||
| "css", | ||
| "js", | ||
| "svg", | ||
| "png" | ||
| ]); | ||
|
|
||
| eleventyConfig.setBrowserSyncConfig({ | ||
| server: { | ||
| baseDir: "./_site", | ||
| middleware: [compress()] | ||
| } | ||
| }); | ||
|
|
||
| eleventyConfig.addWatchTarget("**/*.css"); | ||
| eleventyConfig.addPassthroughCopy("node_modules/@patternfly/**/*"); | ||
|
|
||
| let options = { html: true }; | ||
| let markdownLib = markdownIt(options); | ||
| markdownLib.use(markdownItAnchor); | ||
| markdownLib.use(markdownItContainer, "section", { | ||
| validate: params => { | ||
| return params.trim().match(/^section+(.*)$/); | ||
| }, | ||
| render: (tokens, idx) => { | ||
| let m = tokens[idx].info.trim().match(/^section+(.*)$/); | ||
| let color = m && m[1].trim() === "header" ? "" : "lightest"; | ||
| let size = m && m[1].trim() === "header" ? "" : "small"; | ||
| let classes = m && m[1].trim() === "header" ? `class="header"` : ""; | ||
|
|
||
| if (tokens[idx].nesting === 1) { | ||
| return `<pfe-band size="${size}" color="${color}"${classes}><div class="band-container">` | ||
| } else { | ||
| return `</div></pfe-band>\n`; | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| eleventyConfig.setLibrary("md", markdownLib); | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| githubLink: https://github.com/patternfly/patternfly-elements | ||
| --- | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="theme-color" content="#004080"> | ||
| <meta name="description" content="{{ title }} - PatternFly Elements"> | ||
| <title>{{ title }} - PatternFly Elements</title> | ||
| <link href="/images/logo/pfe-icon-blue.svg" rel="shortcut icon"> | ||
| <link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;700&family=Red+Hat+Text&family=Overpass+Mono&display=swap" rel="stylesheet"> | ||
| <link rel="stylesheet" href="/elements/pfelement/dist/pfelement.min.css"> | ||
| <link rel="stylesheet" href="/elements/pfe-styles/dist/pfe-base.min.css"> | ||
| <link rel="stylesheet" href="/elements/pfe-styles/dist/pfe-layouts.min.css"> | ||
| <link rel="stylesheet" href="/main.css"> | ||
| <link rel="stylesheet" href="/prism.css"> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script> | ||
| <script src="/prism.js"></script> | ||
| <script type="module" src="/elements/pfe-band/dist/pfe-band.min.js"></script> | ||
| </head> | ||
| <body unresolved> | ||
| {{ content | safe }} | ||
| </body> | ||
| </html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.