forked from twbs/bootstrap
-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Colors #10
Merged
julien-deramond
merged 31 commits into
julien-deramond:main-jd-bootstrap-astro
from
HiDeoo:hd-first-pass
Feb 20, 2023
Merged
Colors #10
julien-deramond
merged 31 commits into
julien-deramond:main-jd-bootstrap-astro
from
HiDeoo:hd-first-pass
Feb 20, 2023
Conversation
This file contains 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
Pull Request Test Coverage Report for Build 4225483277
💛 - Coveralls |
Hmmm, not sure we actually want to run GitHub Actions on this kind of PRs at the moment, or at least until we get actions related stuff for the new website. Maybe this should be disabled temporarily on the fork or on PRs from me, w/e you prefer. |
julien-deramond
pushed a commit
that referenced
this pull request
Mar 6, 2023
* fix: remove useless astro script and fix package.json indentation * fix: remove default template content * feat: refactor layouts * feat: move new site src & dist folders * feat: load configm from config.yml * feat: add prettier * fix: config type * feat: add astro check * feat: add typecheck to lint script * fix: eqeqeq * feat: rename and move DocsNavbar & DocsVersions * feat: move skippy * feat: move scripts & icons * feat: add head component * feat: add header component * fix: stricten layout type in components * fix: add missing docs layout * feat: add canonical url * feat: refactor navigation links * chore: add todo * refactor: production check to avoid a string * refactor: versioned docs path * fix: docsearch doc version * feat: page title * chore: add todo * feat: add social * chore: add todos * feat: load styles * fix: disable prettier in base layout * chore: add todos * refactor: move style imports
julien-deramond
pushed a commit
that referenced
this pull request
Mar 24, 2023
* fix: remove useless astro script and fix package.json indentation * fix: remove default template content * feat: refactor layouts * feat: move new site src & dist folders * feat: load configm from config.yml * feat: add prettier * fix: config type * feat: add astro check * feat: add typecheck to lint script * fix: eqeqeq * feat: rename and move DocsNavbar & DocsVersions * feat: move skippy * feat: move scripts & icons * feat: add head component * feat: add header component * fix: stricten layout type in components * fix: add missing docs layout * feat: add canonical url * feat: refactor navigation links * chore: add todo * refactor: production check to avoid a string * refactor: versioned docs path * fix: docsearch doc version * feat: page title * chore: add todo * feat: add social * chore: add todos * feat: load styles * fix: disable prettier in base layout * chore: add todos * refactor: move style imports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Each commit should be small and focused enough to understand the intent of the changes by checking them individually but here are some few highlights.
Layouts
This PR lays the groundwork for using multiple layouts all based on a 'base' layout. Not sure yet how many layouts we'll need but it should be fairly easy to add more and fits more with the Astro philosophy.
Directories
I moved the new website to
site-new
instead ofsrc
assrc
does not make any sense considering the bootstrap repo is not a monorepo and the "source" of bootstrap are not in asrc
directory. I also moved thedist
folder todist-site-new
for the moment as I have no idea what is Bootstrap deal with the committeddist
. I gitignored it for now.Config
I removed your temporary config and we are now parsing the existing
config.yml
file but also validating its content in order to strictly type the config object.The reasonning behind this change is to avoid changing too much of the old habits of the current maintainers as they know this file and it may even be used for something else.
For the strict validation process, we want to break the build process if an invalid edit is made to the config file so we can catch it early and avoid deploying a broken website and also make it easier for the developers when using the config object in the code as you get autocompletion for any known property.
Prettier
I added Prettier as we discussed. It's only used for the new website of course.
To make things easier, having a Prettier extension to your editor is recommended and I also suggest to add this to your VSC settings to specify the default formatter for the
astro
files:Note: this config change won't affect any other files.
Linting
I added a new script
astro-lint
to the rootpackage.json
that checks the following:astro check
that runs Astro related diagnostics (such as type-checking within.astro
files).ESLint is not yet part of this combo even tho ESLint seems to be used in Bootstrap's codebase. I'll add it later but I need to more time to allocate to this and understand how it's used in Bootstrap.
The prettier config is extracted from https://github.com/HiDeoo/prettier-config but it seems to be pretty close to the JS shipped by Boostrap.
Navigation links
I extracted the header navigation links to their own components (not all of them yet, some requires more work). I think you should take a look at this change specifically as the syntax you used was close to being valid but not quite.
Colors are back
This PR adds existing styles, this will properly be refactored but this is enough to get started, specially for you to get a more visual feedback on your progress.