diff --git a/.github/front_matter.yml b/.github/front_matter.yml new file mode 100644 index 0000000..604e4cf --- /dev/null +++ b/.github/front_matter.yml @@ -0,0 +1,21 @@ +--- +layout: custom +title: "Welcome to Our Special Campaign" +subtitle: "Join us in our effort to make a difference" +header_image: "/assets/img/custom-header.jpg" +featured_sections: + - title: "Feature 1" + description: "Description of feature 1." + image: "/assets/img/feature1.jpg" + link: "/feature-1/" + - title: "Feature 2" + description: "Description of feature 2." + link: "/feature-2/" +testimonials: + - quote: "This is an amazing project!" + author: "Jane Doe" + - quote: "Truly a remarkable experience." + author: "John Smith" +--- + +Your main content goes here. This will be displayed in the intro section. diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..c3edc4d --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,36 @@ +name: Auto Update Changelog + +on: + push: + branches: + - main # Set your default branch here + +jobs: + update-changelog: + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2.2' # Set the Ruby version + + - name: Install GitHub Changelog Generator + run: | + gem install github_changelog_generator + gem install faraday-retry # Add this line if retry functionality is needed + + - name: Generate Changelog + run: github_changelog_generator --user 'thomasthaddeus' --project 'vcwtech.github.io' + # Replace [GitHub Username] and [GitHub Repository Name] with actual values + + - name: Commit Changelog + run: | + git config --global user.name 'thomasthaddeus' + git config --global user.email 'thaddeus.r.thomas@gmail.com' + git add CHANGELOG.md + git commit -m "Changelog updated" -a + git push diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 0000000..110fe8a --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,34 @@ +name: Build and deploy Jekyll site + +on: + push: + branches: [ main ] # Set to your default branch + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + # Setup Ruby, Jekyll and build + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2.2' # Set to your Ruby version + + - name: Build and test Jekyll site + run: | + gem install bundler + bundle install + bundle exec jekyll build + + # Optional step for GitHub Pages deployment + - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site # Set to your Jekyll output directory diff --git a/.gitignore b/.gitignore index 74a9223..93030a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig +# Created by https://www.toptal.com/developers/gitignore/api/jekyll,sass,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=jekyll,sass,visualstudiocode + +### Jekyll ### _site/ .sass-cache/ .jekyll-cache/ @@ -5,3 +10,32 @@ _site/ # Ignore folders generated by Bundler .bundle/ vendor/ + +### Sass ### +*.css.map +*.sass.map +*.scss.map + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/jekyll,sass,visualstudiocode + +# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) + diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..acf9bf0 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.2 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..8928339 --- /dev/null +++ b/Gemfile @@ -0,0 +1,24 @@ +source 'https://rubygems.org' + +# Jekyll +gem 'jekyll', '~> 4.3.2' # or the latest stable version +gem 'liquid' +gem 'rack' + +# If you're using GitHub Pages, you might include: +#gem 'github-pages', group: :jekyll_plugins + +# Jekyll Plugins +# Add other Jekyll plugins here as needed. Examples: +gem 'jekyll-feed', '~> 0.17' # for RSS feed generation +gem 'jekyll-sitemap', '~> 1.4' # for creating a sitemap +gem 'jekyll-seo-tag', '~> 2.8.0' # for SEO enhancements + +# For development and testing +group :jekyll_plugins do + gem 'jekyll-admin', '~> 0.11.1' # for an admin dashboard +end + +gem 'webrick' +gem 'faraday-retry' +gem "minima" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..59830ab --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,120 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) + colorator (1.1.0) + concurrent-ruby (1.2.2) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + faraday (2.7.12) + base64 + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.2) + faraday-retry (2.2.0) + faraday (~> 2.0) + ffi (1.16.3-x64-mingw-ucrt) + forwardable-extended (2.6.0) + google-protobuf (3.25.1-x64-mingw-ucrt) + http_parser.rb (0.8.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jekyll (4.3.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-admin (0.11.1) + jekyll (>= 3.7, < 5.0) + sinatra (>= 1.4) + sinatra-contrib (>= 1.4) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + multi_json (1.15.0) + mustermann (3.0.0) + ruby2_keywords (~> 0.0.1) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.4) + rack (2.2.8) + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.6) + rouge (4.2.0) + ruby2_keywords (0.0.5) + safe_yaml (1.0.5) + sass-embedded (1.69.5-x64-mingw-ucrt) + google-protobuf (~> 3.23) + sinatra (3.1.0) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.1.0) + tilt (~> 2.0) + sinatra-contrib (3.1.0) + multi_json + mustermann (~> 3.0) + rack-protection (= 3.1.0) + sinatra (= 3.1.0) + tilt (~> 2.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + tilt (2.3.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + +PLATFORMS + x64-mingw-ucrt + +DEPENDENCIES + faraday-retry + jekyll (~> 4.3.2) + jekyll-admin (~> 0.11.1) + jekyll-feed (~> 0.17) + jekyll-seo-tag (~> 2.8.0) + jekyll-sitemap (~> 1.4) + liquid + minima + rack + webrick + +BUNDLED WITH + 2.4.19 diff --git a/README.md b/README.md index 1fbe95b..b955311 100644 --- a/README.md +++ b/README.md @@ -1 +1,78 @@ -# Visionary-Code-Works.github.io \ No newline at end of file +# VCW-Tech + +Welcome to the repository for My Jekyll Site. This site is built with [Jekyll](https://jekyllrb.com/), a static site generator, and styled using [Bootstrap](https://getbootstrap.com/) (included via CDN). It's automatically built and deployed using GitHub Actions. + +## Features + +- Responsive design with Bootstrap +- Automated build and deployment with GitHub Actions +- Includes custom JavaScript and CSS + +## Prerequisites + +To set up this project locally, you will need the following: + +- Ruby (version as specified in `.ruby-version`) +- Bundler (`gem install bundler`) +- Jekyll (`gem install jekyll`) + +## Local Development + +1. Clone the repository: + + ```bash + git clone https://github.com/yourusername/my-jekyll-site.git + cd my-jekyll-site + ``` + +2. Install dependencies: + + ```bash + bundle install + ``` + +3. Serve the site locally: + + ```bash + bundle exec jekyll serve + ``` + + You can now view the site at `localhost:4000`. + +## Structure + +- `_layouts`: Jekyll HTML layouts. +- `_includes`: Reusable HTML snippets. +- `_sass`: Sass partials for styling. +- `assets`: Contains static files such as images, CSS, and JavaScript. +- `_config.yml`: Configuration settings for Jekyll. +- `.github/workflows/jekyll.yml`: GitHub Actions workflow for CI/CD. +- `Gemfile`: Ruby dependencies for Jekyll. + +## Contributing + +Contributions to this site are welcome. Here's how you can contribute: + +1. Fork the repository. +2. Create a new branch (`git checkout -b feature-branch`). +3. Make your changes. +4. Commit your changes (`git commit -am 'Add some feature'`). +5. Push to the branch (`git push origin feature-branch`). +6. Open a new Pull Request. + +For more details on contributing, please read [CONTRIBUTING.md](CONTRIBUTING.md). + +## Deployment + +This site is automatically built and deployed by GitHub Actions when changes are pushed to the `main` branch. + +## License + +This project is open source and available under the [MIT License](LICENSE). + +### Notes + +- Make sure to replace `https://github.com/yourusername/my-jekyll-site.git` with your actual repository URL. +- Update the Ruby version in the prerequisites if different from what's used in your project. +- Customize any part of the README to better fit the specifics of your site or add additional sections as necessary, like a section for 'Tests' if you have automated testing set up. +- Consider adding a `CONTRIBUTING.md` file with detailed contribution guidelines, and a `LICENSE` file, especially if your project is open source. diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..8994878 --- /dev/null +++ b/_config.yml @@ -0,0 +1,108 @@ +title: Visionary Code Works +description: >- # this means to ignore newlines until "baseurl:" + Visionary Code Works is a cutting-edge technology and design company specializing in innovative digital solutions. Our mission is to create impactful and user-friendly digital experiences that drive growth and efficiency. +baseurl: "" # the subpath of your site, e.g. /blog +url: "https://visionary-code-works.github.io/vcwtech.github.io/" # the base hostname & protocol for your site +email: thaddeus.r.thomas@gmail.com # your-email@domain.com + +# Build settings +markdown: kramdown +theme: minima +plugins: + - jekyll-feed + - jekyll-sitemap + - jekyll-seo-tag + +# SEO settings +seo: + name: Visionary Code Works + description: 'Visionary Code Works is at the forefront of technological innovation, offering a wide range of services from web development to digital marketing strategies. We empower businesses to achieve their digital aspirations.' + twitter: + username: thomasthaddeus + og_image: '/assets/img/thad.jpg' + +# Optional analytics +google_analytics: G-QH33T8MYJZ + +# Optional comments +disqus: + shortname: your-disqus-shortname + +# Build optimizations +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ +keep_files: + - .git + - .svn + +# Collections +collections: + my_collection: + output: true + permalink: /:collection/:name + +# Permalinks +permalink: /:year/:month/:day/:title/ + +# Pagination (if using 'jekyll-paginate' or similar) +paginate: 5 +paginate_path: "/page:num/" + +# Sass/SCSS +sass: + sass_dir: _sass + style: compressed + +# Markdown extensions +kramdown: + input: GFM + hard_wrap: false + footnote_nr: 1 + entity_output: as_char + toc_levels: 1..6 + smart_quotes: lsquo,rsquo,ldquo,rdquo + enable_coderay: false + +# Plugins (if you have specific plugins) +plugins_dir: _plugins + +# Site language +lang: en + +# Date and Time Format +date_format: '%b %-d, %Y' + +# Default Front Matter +# Optional feature images for posts +defaults: + - + scope: + path: ".github/front_matter.yml" + type: "posts" + values: + layout: "post" + author: "thomasthaddeus" + image: "/assets/img/thad.jpg" + +# Social Media Links +social_links: + twitter: yourtwitterhandle + facebook: yourfacebookpage + github: yourgithubusername + linkedin: yourlinkedinprofile + +# Footer settings +footer: + links: + - title: About + url: /about + - title: Privacy Policy + url: /privacy-policy + - title: Contact + url: /contact diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..77f2532 --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,17 @@ +main: + - title: Home + url: / + - title: About + url: /about/ + - title: Blog + url: /blog/ + - title: Portfolio + url: /portfolio/ + - title: Contact + url: /contact/ + +footer: + - title: Privacy Policy + url: /privacy-policy/ + - title: Terms of Service + url: /terms-of-service/ diff --git a/_drafts/a-new-post.md b/_drafts/a-new-post.md new file mode 100644 index 0000000..e69de29 diff --git a/_includes/analytics.html b/_includes/analytics.html new file mode 100644 index 0000000..9bde02f --- /dev/null +++ b/_includes/analytics.html @@ -0,0 +1,9 @@ +{% if site.google_analytics %} + + +{% endif %} \ No newline at end of file diff --git a/_includes/comments.html b/_includes/comments.html new file mode 100644 index 0000000..bd6bb07 --- /dev/null +++ b/_includes/comments.html @@ -0,0 +1,17 @@ +{% if page.comments %} +
+ + +{% endif %} \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..3e9b5d7 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..612d00f --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,8 @@ + diff --git a/_includes/navigation.html b/_includes/navigation.html new file mode 100644 index 0000000..9104b87 --- /dev/null +++ b/_includes/navigation.html @@ -0,0 +1,7 @@ + diff --git a/_includes/seo.html b/_includes/seo.html new file mode 100644 index 0000000..4215b3f --- /dev/null +++ b/_includes/seo.html @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/_includes/sidebar.html b/_includes/sidebar.html new file mode 100644 index 0000000..4ceee2b --- /dev/null +++ b/_includes/sidebar.html @@ -0,0 +1,52 @@ + \ No newline at end of file diff --git a/_includes/social-links.html b/_includes/social-links.html new file mode 100644 index 0000000..30237d5 --- /dev/null +++ b/_includes/social-links.html @@ -0,0 +1,79 @@ + diff --git a/_layouts/archive.html b/_layouts/archive.html new file mode 100644 index 0000000..297d9a0 --- /dev/null +++ b/_layouts/archive.html @@ -0,0 +1,26 @@ +--- +layout: default +--- +
+

Archive

+ {% for post in site.posts %} + {% unless post.previous %} +

{{ post.date | date: '%Y' }}

+ +

{{ post.next.date | date: '%Y' }}

+ + {% endif %} + {% endfor %} +
diff --git a/_layouts/category.html b/_layouts/category.html new file mode 100644 index 0000000..7f4c29a --- /dev/null +++ b/_layouts/category.html @@ -0,0 +1,27 @@ +--- +layout: default +--- +
+

Posts in category: {{ page.title }}

+ {% for post in site.categories[page.title] %} +
+

{{ post.title }}

+
+ {% endfor %} +
+ + +--- +layout: default +--- +
+

Posts in '{{ page.category }}' category

+ +
diff --git a/_layouts/custom.html b/_layouts/custom.html new file mode 100644 index 0000000..6b4098a --- /dev/null +++ b/_layouts/custom.html @@ -0,0 +1,51 @@ +
+
+
+

{{ page.title }}

+ {% if page.subtitle %} +

{{ page.subtitle }}

+ {% endif %} +
+
+ +
+
+ {{ content }} +
+
+ + {% if page.featured_sections %} + + {% endif %} + + {% if page.testimonials %} +
+
+

What People Say

+
    + {% for testimonial in page.testimonials %} +
  • +
    {{ testimonial.quote }}
    + {{ testimonial.author }} +
  • + {% endfor %} +
+
+
+ {% endif %} + + +
diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..795b6fa --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,27 @@ + + + + + {{ page.title | escape }} - {{ site.title | escape }} + + + + + + + + + {% include header.html %} + +
+ {{ content }} +
+ + {% include footer.html %} + + + + + + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..46a648a --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,29 @@ +--- +layout: default +--- +
+

Welcome to {{ site.title }}

+ +
+ +--- +layout: default +--- +
+
+

Welcome to {{ site.title }}

+

{{ site.description }}

+
+
+

Recent Posts

+ +
+ +
diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..346e413 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,23 @@ +--- +layout: default +--- +
+
+

{{ page.title }}

+
+
+ {{ content }} +
+
+ +--- +layout: default +--- +
+ +
+ {{ content }} +
+
diff --git a/_layouts/portfolio.html b/_layouts/portfolio.html new file mode 100644 index 0000000..22de595 --- /dev/null +++ b/_layouts/portfolio.html @@ -0,0 +1,16 @@ +--- +layout: default +--- +
+

My Portfolio

+
+ {% for item in site.data.portfolio %} +
+

{{ item.title }}

+

{{ item.description }}

+ Learn more + +
+ {% endfor %} +
+
diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..714f32a --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,34 @@ +--- +layout: default +--- +
+
+

{{ page.title }}

+ +
+
+ {{ content }} +
+
+ +--- +layout: default +--- +
+
+

Welcome to {{ site.title }}

+

{{ site.description }}

+
+
+

Recent Posts

+ +
+ +
diff --git a/_layouts/tag.html b/_layouts/tag.html new file mode 100644 index 0000000..cdf7965 --- /dev/null +++ b/_layouts/tag.html @@ -0,0 +1,14 @@ +--- +layout: default +--- +
+

Posts tagged with '{{ page.tag }}'

+ +
diff --git a/_sass/_base.scss b/_sass/_base.scss new file mode 100644 index 0000000..d458b61 --- /dev/null +++ b/_sass/_base.scss @@ -0,0 +1,53 @@ +// _base.scss + +// Body +body { + font-family: 'Helvetica Neue', Arial, sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; + background-color: #fff; + } + + // Headings + h1, h2, h3, h4, h5, h6 { + color: #333; + margin-top: 1.5rem; + margin-bottom: 1rem; + } + + h1 { font-size: 2.5rem; } + h2 { font-size: 2rem; } + h3 { font-size: 1.75rem; } + h4 { font-size: 1.5rem; } + h5 { font-size: 1.25rem; } + h6 { font-size: 1rem; } + + // Paragraphs + p { + margin-top: 0; + margin-bottom: 1rem; + } + + // Links + a { + color: #007bff; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + // Lists + ul, ol { + padding-left: 2rem; + margin-top: 0; + margin-bottom: 1rem; + } + + li { + margin-bottom: 0.5rem; + } + + // Additional base styles as needed... diff --git a/_sass/_bootstrap-overrides.scss b/_sass/_bootstrap-overrides.scss new file mode 100644 index 0000000..3f41206 --- /dev/null +++ b/_sass/_bootstrap-overrides.scss @@ -0,0 +1,28 @@ +// _bootstrap-overrides.scss + +// Example of overriding Bootstrap's primary color +$primary: #4caf50; // Green instead of default blue + +// Customizing the navbar +.navbar { + background-color: $primary; + + .navbar-brand { + font-weight: bold; + color: #fff; + + &:hover { + color: darken(#fff, 10%); + } + } + + .nav-link { + color: #fff; + + &:hover { + color: darken(#fff, 10%); + } + } +} + +// More Bootstrap overrides as needed... diff --git a/_sass/_footer.scss b/_sass/_footer.scss new file mode 100644 index 0000000..f4406c8 --- /dev/null +++ b/_sass/_footer.scss @@ -0,0 +1,33 @@ +// _footer.scss + +.footer { + background-color: $footerBgColor; // Variable from _variables.scss + color: $footerTextColor; + padding: 2rem 0; + + .footer-links { + a { + color: $footerLinkColor; + &:hover { + color: darken($footerLinkColor, 15%); + } + } + + // List styles, if footer links are in list format + li { + margin-bottom: 0.5rem; + } + } + + // Additional styling for other footer elements + .social-links { + i { + color: #fff; + margin-right: 10px; + + &:hover { + color: $primaryColor; // From _variables.scss + } + } + } + } diff --git a/_sass/_header.scss b/_sass/_header.scss new file mode 100644 index 0000000..904bfa6 --- /dev/null +++ b/_sass/_header.scss @@ -0,0 +1,19 @@ +// _header.scss + +.header { + background-color: $headerBgColor; // Variable from _variables.scss + padding: 1rem 0; + + .branding { + a { + color: $headerTextColor; + font-size: 1.5rem; + font-weight: bold; + text-decoration: none; + } + } + + .navigation { + // Navigation styles... + } + } diff --git a/_sass/_mixins.scss b/_sass/_mixins.scss new file mode 100644 index 0000000..8a2e597 --- /dev/null +++ b/_sass/_mixins.scss @@ -0,0 +1,46 @@ +// _mixins.scss + +// _mixins.scss + +// Mixin for Flexbox Centering +@mixin flex-center { + display: flex; + justify-content: center; + align-items: center; +} + +// Mixin for Responsive Font Size +@mixin responsive-font-size($size) { + font-size: $size; + @media (max-width: $breakpoint-md) { + font-size: $size * 0.9; + } + @media (max-width: $breakpoint-sm) { + font-size: $size * 0.8; + } +} + +// Mixin for Button Styling +@mixin button-variant($bgColor, $textColor) { + background-color: $bgColor; + color: $textColor; + &:hover { + background-color: darken($bgColor, 10%); + color: lighten($textColor, 10%); + } +} + +@mixin box-shadow($shadow) { + -webkit-box-shadow: $shadow; + -moz-box-shadow: $shadow; + box-shadow: $shadow; + } + + @mixin transition($property, $duration, $timing-function) { + -webkit-transition: $property $duration $timing-function; + -moz-transition: $property $duration $timing-function; + -o-transition: $property $duration $timing-function; + transition: $property $duration $timing-function; + } + + // More mixins as needed... diff --git a/_sass/_responsive.scss b/_sass/_responsive.scss new file mode 100644 index 0000000..e69de29 diff --git a/_sass/_sidebar.scss b/_sass/_sidebar.scss new file mode 100644 index 0000000..90c05d8 --- /dev/null +++ b/_sass/_sidebar.scss @@ -0,0 +1,54 @@ +// _sidebar.scss + +.sidebar { + background-color: $sidebarBgColor; + padding: 1rem; + margin-top: 1rem; + + // Search box styling + .search { + margin-bottom: 2rem; + input[type="text"] { + width: 100%; + padding: 0.5rem; + border: 1px solid $lightGray; + border-radius: 4px; + } + } + + // Recent posts styling + .recent-posts { + h3 { + margin-bottom: 1rem; + } + ul { + list-style: none; + padding: 0; + li { + margin-bottom: 0.5rem; + a { + text-decoration: none; + &:hover { + text-decoration: underline; + } + } + } + } + } + + // Categories and tags styling + .categories, .tags { + ul { + list-style-type: none; + padding: 0; + } + } + + // Advertisement styling + .ads { + margin-top: 2rem; + // Style for ad content + } + + // More sidebar-specific styles... + } diff --git a/_sass/_variables.scss b/_sass/_variables.scss new file mode 100644 index 0000000..270152a --- /dev/null +++ b/_sass/_variables.scss @@ -0,0 +1,58 @@ +// _variables.scss + +// Color Scheme +$primaryColor: #007bff; +$secondaryColor: #6c757d; +$successColor: #28a745; +$infoColor: #17a2b8; +$warningColor: #ffc107; +$dangerColor: #dc3545; +$lightColor: #f8f8f8; +$darkColor: #343a40; +$sidebarBgColor: #f4f4f4; +$textColor: #333; +$footerBgColor: #222; +$footerTextColor: #fff; +$footerLinkColor: $lightColor; +$lightGray: #ddd; +$headerBgColor: #333; +$headerTextColor: #fff; + +// Extended Color Palette +$accentColor: #ff5722; // Example of an accent color +$backgroundColor: #f8f8f8; +$linkColor: #007bff; +$linkHoverColor: darken($linkColor, 15%); + +// Typography +$fontFamily: 'Helvetica Neue', Arial, sans-serif; +$baseFontSize: 16px; +$smallFontSize: 0.8rem; +$largeFontSize: 1.2rem; +$headingFontFamily: 'Georgia', serif; +$headingFontWeight: 700; + +// Spacing +$spacing-unit: 1rem; +$spacing-small: $spacing-unit / 2; +$spacing-large: $spacing-unit * 1.5; + +// Borders and Radius +$border-radius: 4px; +$border-color: $lightGray; + +// Breakpoints for responsive design +$breakpoint-xs: 320px; +$breakpoint-sm: 576px; +$breakpoint-md: 768px; +$breakpoint-lg: 992px; +$breakpoint-xl: 1200px; + +// Container widths +$container-sm: 540px; +$container-md: 720px; +$container-lg: 960px; +$container-xl: 1140px; + + +// More variables as needed... diff --git a/_sass/main.scss b/_sass/main.scss new file mode 100644 index 0000000..42af507 --- /dev/null +++ b/_sass/main.scss @@ -0,0 +1,32 @@ +// main.scss + +// Variables and Mixins +@import "variables"; +@import "mixins"; + +// Base styles +body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 1.5; + color: $textColor; // Variable defined in _variables.scss + background-color: $backgroundColor; // Variable defined in _variables.scss +} + +a { + color: $primaryColor; // Variable defined in _variables.scss + &:hover { + color: darken($primaryColor, 10%); + } +} + +// Custom components +@import "header"; +@import "footer"; +@import "sidebar"; + +// Responsive styles +@import "responsive"; + +// Bootstrap overrides (if needed) +@import "bootstrap-overrides"; diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..0fd1885 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,38 @@ +.custom-page { + /* Styles for the custom page */ +} + +.custom-header { + background-size: cover; + text-align: center; + color: white; + padding: 50px 0; +} + +.header-content h1 { + font-size: 2.5em; +} + +.intro-section { + padding: 20px; + background-color: #f8f8f8; +} + +.featured-sections { + padding: 20px 0; +} + +.featured-section { + margin-bottom: 20px; +} + +.testimonials { + background-color: #e9ecef; + padding: 20px; +} + +.testimonials blockquote { + font-style: italic; +} + +/* Additional styles as needed */ diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..9f41894 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,4 @@ +--- +--- + +@import "main"; diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..e69de29 diff --git a/assets/img/site-logo.png b/assets/img/site-logo.png new file mode 100644 index 0000000..1bc3dd3 Binary files /dev/null and b/assets/img/site-logo.png differ diff --git a/assets/img/thad.jpg b/assets/img/thad.jpg new file mode 100644 index 0000000..ddfb8f0 Binary files /dev/null and b/assets/img/thad.jpg differ diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..4f53da8 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,5 @@ +// JavaScript for custom page interactions +document.addEventListener('DOMContentLoaded', function() { + // Your custom JavaScript code + // Example: document.querySelector('.some-element').addEventListener(...) +}); diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..8f561cc --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,167 @@ +document.addEventListener('DOMContentLoaded', function() { + + // Smooth Scrolling for Anchor Links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); + }); + + // Collapsible sections - for FAQs or similar sections + document.querySelectorAll('.collapsible').forEach(collapsible => { + collapsible.addEventListener('click', function() { + this.classList.toggle('active'); + var content = this.nextElementSibling; + if (content.style.maxHeight){ + content.style.maxHeight = null; + } else { + content.style.maxHeight = content.scrollHeight + "px"; + } + }); + }); + + // Image Gallery - Lightbox effect + document.querySelectorAll('.gallery-item').forEach(item => { + item.addEventListener('click', function() { + var src = this.getAttribute('data-src'); + var lightboxImage = document.getElementById('lightbox-image'); + if (lightboxImage) { + lightboxImage.src = src; + // Code to show lightbox + } + }); + }); + // Initializing Bootstrap Tooltips + if (window.bootstrap && bootstrap.Tooltip) { + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); + tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl); + }); + } + + // Event listener for Bootstrap Modal + var myModal = document.getElementById('myModal'); + if (myModal) { + myModal.addEventListener('shown.bs.modal', function () { + console.log('Modal is shown!'); + }); + } + + // Custom JavaScript for toggling classes + var toggleButton = document.getElementById('toggle-button'); + if (toggleButton) { + toggleButton.addEventListener('click', function() { + document.body.classList.toggle('dark-mode'); + }); + } + + // Dynamic content loading + var loadMoreButton = document.getElementById('load-more'); + if (loadMoreButton) { + loadMoreButton.addEventListener('click', function() { + // Example: Ajax call to load more content + // Fetch more data and append it to the DOM + console.log('Load more content here...'); + }); + } + + // Handling Bootstrap Carousel events + var myCarousel = document.querySelector('#myCarousel'); + if (myCarousel) { + myCarousel.addEventListener('slide.bs.carousel', function (e) { + console.log('Carousel slide event!'); + // Additional carousel handling code + }); + } + + + // Form Validation before Submit + var form = document.getElementById('contact-form'); + if (form) { + form.addEventListener('submit', function(event) { + if (!form.checkValidity()) { + event.preventDefault(); + event.stopPropagation(); + } + form.classList.add('was-validated'); + }, false); + } + + // Dynamically loading script + var loadScriptButton = document.getElementById('load-script'); + if (loadScriptButton) { + loadScriptButton.addEventListener('click', function() { + var script = document.createElement('script'); + script.src = 'path/to/your/dynamic/script.js'; + document.head.appendChild(script); + }); + } + + // Toggle Button for Dark Mode + const darkModeToggle = document.querySelector('#dark-mode-toggle'); + if (darkModeToggle) { + darkModeToggle.addEventListener('click', function() { + document.body.classList.toggle('dark-mode'); + // Save preference in local storage or handle theme switching logic + }); + } + + // Responsive Navigation Menu Toggle for Mobile View + const menuToggle = document.querySelector('.menu-toggle'); + const mainNav = document.querySelector('.main-navigation'); + if (menuToggle && mainNav) { + menuToggle.addEventListener('click', function() { + mainNav.classList.toggle('active'); + }); + } + + // Countdown Timer for Events + const countdownTimer = document.getElementById('countdown-timer'); + if (countdownTimer) { + const targetDate = new Date(countdownTimer.getAttribute('data-target-date')).getTime(); + const updateCountdown = setInterval(function() { + const now = new Date().getTime(); + const distance = targetDate - now; + + const days = Math.floor(distance / (1000 * 60 * 60 * 24)); + const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((distance % (1000 * 60)) / 1000); + + countdownTimer.innerHTML = days + "d " + hours + "h " + minutes + "m " + seconds + "s "; + + if (distance < 0) { + clearInterval(updateCountdown); + countdownTimer.innerHTML = "Event Started"; + } + }, 1000); + } + + // Dynamic Content Loading on Scroll + window.addEventListener('scroll', function() { + const loadOnScrollElement = document.getElementById('load-on-scroll'); + if (loadOnScrollElement && window.scrollY + window.innerHeight >= loadOnScrollElement.offsetTop) { + // Load content dynamically or display additional content + console.log('Load dynamic content here'); + } + }); + + // Tooltips Initialization (If Bootstrap is not used) + // If you are not using Bootstrap, you can initialize tooltips manually + const tooltips = document.querySelectorAll('.tooltip'); + tooltips.forEach(tooltip => { + tooltip.addEventListener('mouseover', function() { + // Show tooltip logic + }); + tooltip.addEventListener('mouseout', function() { + // Hide tooltip logic + }); + }); + + // More custom JavaScript code + // ... +}); diff --git a/docs/ProjectPlan.md b/docs/ProjectPlan.md new file mode 100644 index 0000000..93ab0a5 --- /dev/null +++ b/docs/ProjectPlan.md @@ -0,0 +1,2909 @@ +Creating a Jekyll website and deploying it using GitHub Actions involves several key steps, from initial setup to deployment and maintenance. Below is a detailed project plan tailored for the website "": + +### 1. Project Planning and Requirements Gathering + +- **Objective**: Understand the purpose, content, and design requirements of the website. +- **Tasks**: + - Review the current website for content and design. + - Define the target audience and objectives. + - List desired features (blog, gallery, contact form, etc.). + - Determine the timeline and budget. + +### 2. Setting Up the Development Environment + +- **Objective**: Prepare a local development environment for Jekyll. +- **Tasks**: + - Install Ruby, Jekyll, and Bundler. + - Create a new Jekyll project or clone an existing template. + - Test the local setup by running the Jekyll server. + +### 3. Website Design and Development + +- **Objective**: Develop the website layout, design, and content. +- **Tasks**: + - Create or choose a Jekyll theme that fits the design requirements. + - Customize the theme (HTML, CSS, JavaScript). + - Develop content pages (Home, About, Services, Blog, Contact). + - Optimize for mobile responsiveness and accessibility. + - Integrate any required plugins (SEO, social media integration). + +### 4. Version Control Setup + +- **Objective**: Initialize a Git repository and connect to GitHub. +- **Tasks**: + - Initialize a Git repository in the Jekyll project. + - Connect the local repository to a new GitHub repository. + - Commit and push the initial codebase to GitHub. + +### 5. GitHub Actions for Continuous Integration/Deployment + +- **Objective**: Automate the deployment process using GitHub Actions. +- **Tasks**: + - Create a `.github/workflows` directory in the project. + - Write a GitHub Actions workflow file for Jekyll build and deployment. + - Configure the workflow to trigger on push events to the main branch. + - Test the GitHub Actions workflow to ensure automatic deployment. + +### 6. Quality Assurance and Testing + +- **Objective**: Ensure the website functions correctly across different browsers and devices. +- **Tasks**: + - Conduct cross-browser testing (Chrome, Firefox, Safari, Edge). + - Test on various devices (desktop, tablet, mobile). + - Validate HTML/CSS. + - Check for broken links and images. + - Test load times and optimize if necessary. + +### 7. Launch and Deployment + +- **Objective**: Deploy the website to GitHub Pages. +- **Tasks**: + - Merge the final version of the website to the main branch. + - Ensure GitHub Actions successfully deploys the site. + - Verify the live site for any issues. + +### 8. Post-Launch Activities + +- **Objective**: Monitor, update, and maintain the website post-launch. +- **Tasks**: + - Monitor website analytics. + - Regularly update the content. + - Apply security updates to Jekyll and dependencies. + - Engage with the audience through comments or feedback forms. + +### 9. Documentation and Handover + +- **Objective**: Document the development process and hand over to the client or maintainers. +- **Tasks**: + - Document the website architecture, theme customization, and deployment process. + - Provide a user manual for updating and maintaining the website. + - Hand over all credentials and documentation. + +### 10. Project Review and Feedback + +- **Objective**: Evaluate the project success and gather feedback. +- **Tasks**: + - Collect feedback from the client and users. + - Review project goals versus outcomes. + - Identify areas for improvement or future enhancements. + +This plan provides a structured approach to developing and deploying a Jekyll website using GitHub Actions, ensuring a thorough process from conception to launch and beyond. + +From your description, it seems that the website at "" is automatically generated using Jekyll, a popular static site generator. The initial build you've shown is a basic HTML structure, which Jekyll uses as a template to render pages. This process involves converting Markdown files and layouts into a static HTML website. + +Here's a revised project plan that focuses on enhancing and automating this Jekyll site using GitHub Actions: + +### 1. Analyzing the Existing Setup + +- **Objective**: Understand the current automated Jekyll setup. +- **Tasks**: + - Review the existing GitHub repository for Jekyll configurations and themes. + - Identify how the site is currently being built and deployed. + - Note any existing GitHub Actions workflows. + +### 2. Enhancing Site Content and Structure + +- **Objective**: Update and improve the website’s content and layout. +- **Tasks**: + - Develop additional Markdown content (blog posts, service pages, etc.). + - Customize or develop new layouts and includes for varied page types. + - Enhance navigation and user interface for better user experience. + - Ensure all content is mobile-responsive and accessible. + +### 3. Optimizing Jekyll Configuration + +- **Objective**: Fine-tune Jekyll for optimal performance and SEO. +- **Tasks**: + - Update `_config.yml` for site-wide configurations. + - Integrate SEO plugins like `jekyll-seo-tag`. + - Ensure fast load times by optimizing images and minimizing CSS/JS. + +### 4. GitHub Repository Management + +- **Objective**: Organize and maintain the GitHub repository. +- **Tasks**: + - Structure the repository with clear directory and file naming. + - Use branches for development and feature implementations. + - Implement a clear commit and merge strategy. + +### 5. Automating Deployment with GitHub Actions + +- **Objective**: Set up or enhance GitHub Actions for automated deployment. +- **Tasks**: + - Create or revise GitHub Actions workflows for building and deploying the Jekyll site. + - Configure GitHub Actions to run on push to specific branches (e.g., main, development). + - Test the automated deployment to ensure it works seamlessly. + +### 6. Continuous Integration and Testing + +- **Objective**: Establish a CI pipeline to maintain code quality. +- **Tasks**: + - Integrate testing tools for HTML/CSS validation. + - Set up automated tests for link checks and accessibility. + - Ensure smooth build process without errors or warnings. + +### 7. Documentation and Knowledge Transfer + +- **Objective**: Document the development and deployment process. +- **Tasks**: + - Create a README file with instructions on how to update the site. + - Document the structure of the site and any custom configurations. + - Include guidelines for contributing to the site for future maintainers. + +### 8. Future Enhancements and Scalability + +- **Objective**: Plan for future development and scalability. +- **Tasks**: + - Identify potential features or improvements (e.g., comments, search functionality). + - Plan for scaling the site as content grows. + - Consider integration with external services if needed (e.g., newsletters, e-commerce). + +### 9. Review and Feedback + +- **Objective**: Review the updated site and gather feedback. +- **Tasks**: + - Conduct user testing and gather feedback for usability and design. + - Review site analytics post-update for improvements or issues. + - Make necessary adjustments based on feedback. + +By following this plan, you'll be able to enhance the existing Jekyll website, improve its content and design, and ensure efficient and automated deployment using GitHub Actions. + +For a Jekyll website hosted on GitHub and deployed using GitHub Actions, the initial repository structure (or outline) typically includes several key directories and files. This structure is designed to organize the content, configurations, and automation scripts effectively. Here's a typical outline: + +``` +repository-name/ +│ +├── _config.yml # Main configuration file for Jekyll +├── Gemfile # Ruby dependencies for Jekyll +├── Gemfile.lock # Snapshot of all gems and versions used +│ +├── .github/ # GitHub-specific configurations +│ └── workflows/ # GitHub Actions workflows +│ └── jekyll.yml # Workflow file for building and deploying the Jekyll site +│ +├── _posts/ # Blog posts (Markdown files) +│ └── 2023-01-01-my-first-post.md +│ +├── _layouts/ # Custom layouts for your site +│ ├── default.html +│ └── post.html +│ +├── _includes/ # Reusable components like headers, footers, etc. +│ ├── header.html +│ └── footer.html +│ +├── _data/ # Data files (YAML, JSON, CSV) for additional site data +│ └── navigation.yml +│ +├── assets/ # Static assets like CSS, JavaScript, images +│ ├── css/ +│ │ └── style.scss +│ ├── js/ +│ └── images/ +│ +├── _sass/ # Sass partials for styling +│ └── _base.scss +│ +├── _drafts/ # Draft posts +│ └── a-new-post.md +│ +├── pages/ # Static pages (e.g., About, Contact) +│ ├── about.md +│ └── contact.md +│ +├── README.md # Repository readme with general info and instructions +├── LICENSE # License file +└── index.html or index.md # The main landing page for your site +``` + +### Key Components + +1. **_config.yml**: This is the main configuration file for Jekyll. It includes settings like the site title, description, URL, and any custom configurations. + +2. **Gemfile and Gemfile.lock**: These files are used for managing Ruby dependencies. `Gemfile` specifies the gems (libraries) required, while `Gemfile.lock` records the exact versions of these gems. + +3. **.github/workflows/jekyll.yml**: This YAML file defines the GitHub Actions workflow for building and deploying your Jekyll site. + +4. **_posts**: This directory contains your blog posts, written in Markdown format. + +5. **_layouts**: Custom HTML templates for different types of pages on your site. + +6. **_includes**: Reusable components like headers and footers, which can be included in layouts and pages. + +7. **_data**: Stores data files which can be accessed site-wide, useful for things like site navigation, configuration, etc. + +8. **assets**: Contains static files such as CSS, JavaScript, and images. + +9. **_sass**: If you're using Sass for styling, this directory contains the Sass partials. + +10. **_drafts**: Drafts of blog posts or pages that are not ready to be published yet. + +11. **pages**: For non-blog static pages like 'About', 'Contact', etc. + +12. **README.md**: A readme file for the repository, providing an overview and instructions. + +13. **LICENSE**: The license file for the content and code in the repository. + +14. **index.html or index.md**: The main landing page for your Jekyll site. + +This structure sets a solid foundation for a Jekyll website, ensuring organization and ease of development, especially when combined with GitHub Actions for CI/CD. + +A significant portion of the initial project setup for a Jekyll website can be automated, especially when leveraging tools like GitHub, GitHub Actions, and various Jekyll-related automation tools. Here's a breakdown of what can be automated and how: + +### 1. Creating a New Jekyll Site + +- **Automation**: You can use Jekyll commands to automatically generate the basic structure of a new site. +- **Command**: `jekyll new your-site-name` + +### 2. Version Control Initialization and Setup + +- **Automation**: Initializing a Git repository and committing the initial codebase can be done via command-line scripts. +- **Commands**: + - `git init` + - `git add .` + - `git commit -m "Initial commit"` + +### 3. Creating a GitHub Repository + +- **Automation**: GitHub CLI (Command Line Interface) can automate the creation of a new repository on GitHub. +- **Command**: `gh repo create [repository-name]` + +### 4. Pushing Code to GitHub + +- **Automation**: Git commands can automate pushing the initial codebase to the GitHub repository. +- **Commands**: + - `git remote add origin [repository-url]` + - `git branch -M main` + - `git push -u origin main` + +### 5. Setting Up GitHub Actions for CI/CD + +- **Automation**: You can write a GitHub Actions workflow file that automates the build and deployment process each time you push new changes. +- **Process**: Create a `.github/workflows/jekyll.yml` file with the necessary configurations for building and deploying the Jekyll site. + +### 6. Dependency Management + +- **Automation**: Use Bundler to automate Ruby gem dependencies. +- **Commands**: + - `bundle init` (to initialize a Gemfile) + - Add `gem "jekyll"` to the Gemfile + - `bundle install` (to install dependencies) + +### 7. Basic Content and Layout Setup + +- **Partial Automation**: While specific content and design customization requires manual input, you can use Jekyll themes or templates to quickly set up a basic design and layout structure. +- **Process**: Choose a Jekyll theme and apply it to the site. This can be partially automated through Jekyll commands or by manually editing the `_config.yml` file. + +### 8. Continuous Integration Tests + +- **Automation**: Configure GitHub Actions to run tests (like HTML/CSS validation, link checks) each time the site is built. + +### 9. Documentation + +- **Partial Automation**: Basic README files can be generated automatically using templates or README generators. + +### Limitations and Manual Tasks + +- **Content Creation**: Writing actual website content (like blog posts, page text) is a manual process. +- **Custom Design and Layouts**: Customizing themes, layouts, and CSS for specific design needs is typically a manual process, although frameworks and pre-built themes can simplify it. +- **Advanced Configurations**: Specific configurations in `_config.yml` and other settings (SEO, analytics) need manual setup. + +By automating these aspects, you can significantly speed up the initial project setup process, allowing more time to be spent on content creation, design customization, and advanced feature development. + +Creating a program to automate the initial build and setup of a Jekyll website repository involves scripting a series of commands that will handle various tasks like initializing a Jekyll site, setting up Git, creating a GitHub repository, and configuring GitHub Actions for CI/CD. Here's a basic shell script that can accomplish this. + +This script assumes you have Jekyll, Git, and the GitHub CLI installed on your system. If not, you'll need to install them first. Also, this script should be run in a Unix-like environment (like Linux or macOS). + +```bash +#!/bin/bash + +# Define variables +REPO_NAME="your-repo-name" +JEKYLL_THEME="minima" # or your preferred theme +GITHUB_USERNAME="your-github-username" + +# Step 1: Create a New Jekyll Site +jekyll new $REPO_NAME --theme $JEKYLL_THEME +cd $REPO_NAME + +# Step 2: Initialize Git and Commit +git init +git add . +git commit -m "Initial Jekyll site with theme $JEKYLL_THEME" + +# Step 3: Create GitHub Repository +gh repo create $REPO_NAME --public --source=. --remote=origin + +# Step 4: Push to GitHub +git push -u origin main + +# Step 5: Setup GitHub Actions for Jekyll +mkdir -p .github/workflows +echo "name: Jekyll site CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build and test Jekyll site + uses: jekyll/actions-jekyll@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }}" > .github/workflows/jekyll.yml + +git add .github/workflows/jekyll.yml +git commit -m "Setup GitHub Actions for Jekyll" +git push + +echo "Repository setup completed!" +``` + +### How to Use the Script + +1. **Save the script**: Copy the script into a file, for example, `setup_jekyll_repo.sh`. + +2. **Make it executable**: Run `chmod +x setup_jekyll_repo.sh` to make the script executable. + +3. **Run the script**: Execute the script with `./setup_jekyll_repo.sh`. + +### Customizations + +- **`REPO_NAME`**: Replace `your-repo-name` with the desired repository name. +- **`JEKYLL_THEME`**: Replace `minima` with any Jekyll theme you prefer. +- **`GITHUB_USERNAME`**: Replace `your-github-username` with your actual GitHub username. + +### Notes + +- Ensure you have the necessary permissions to create repositories on GitHub. +- This script doesn't handle advanced setup like custom configurations or theme customizations. +- The GitHub CLI (`gh`) must be authenticated with your GitHub account for the script to create a repository on your behalf. +- The script sets up a basic GitHub Actions workflow. You might need to modify this according to your specific CI/CD requirements. +- Always review and understand a script before running it, especially if it's performing operations like repository creation and pushing code. + +Sure, let's extend the script to include steps 6, 7, and 8, which cover dependency management, basic content and layout setup, and initial README documentation. Here's the revised script: + +```bash +#!/bin/bash + +# Define variables +REPO_NAME="your-repo-name" +JEKYLL_THEME="minima" # or your preferred theme +GITHUB_USERNAME="your-github-username" + +# Step 1: Create a New Jekyll Site +jekyll new $REPO_NAME --theme $JEKYLL_THEME +cd $REPO_NAME + +# Step 2: Initialize Git and Commit +git init +git add . +git commit -m "Initial Jekyll site with theme $JEKYLL_THEME" + +# Step 3: Create GitHub Repository +gh repo create $REPO_NAME --public --source=. --remote=origin + +# Step 4: Push to GitHub +git push -u origin main + +# Step 5: Setup GitHub Actions for Jekyll +mkdir -p .github/workflows +echo "name: Jekyll site CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build and test Jekyll site + uses: jekyll/actions-jekyll@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }}" > .github/workflows/jekyll.yml + +git add .github/workflows/jekyll.yml +git commit -m "Setup GitHub Actions for Jekyll" +git push + +# Step 6: Dependency Management with Bundler +bundle init +echo "gem 'jekyll', '$(jekyll -v | cut -d' ' -f2)'" >> Gemfile +bundle install +git add Gemfile Gemfile.lock +git commit -m "Add Gemfile for Jekyll dependencies" +git push + +# Step 7: Basic Content and Layout Setup +# (This step is usually manual and theme dependent. Script can create placeholder directories.) +mkdir -p _layouts _includes _sass +touch _layouts/default.html +touch _includes/header.html +touch _includes/footer.html +touch _sass/main.scss +git add _layouts _includes _sass +git commit -m "Add basic structure for layouts, includes, and sass" +git push + +# Step 8: Initial README Documentation +echo "# $REPO_NAME + +This is a Jekyll site hosted on GitHub Pages. + +## Setup + +* To run locally, use 'bundle exec jekyll serve' +* Push to the main branch to deploy to GitHub Pages via GitHub Actions. + +## Structure + +* _posts: Blog posts in Markdown format. +* _layouts: HTML layouts for site pages. +* _includes: Reusable HTML components. +* _sass: Sass files for styling. +* assets: Static files like CSS, JS, and images." > README.md + +git add README.md +git commit -m "Add initial README documentation" +git push + +echo "Repository setup completed!" +``` + +### Additional Steps Explained + +- **Step 6: Dependency Management**: This step initializes Bundler, adds Jekyll as a dependency in the Gemfile, and runs `bundle install` to manage Ruby dependencies. +- **Step 7: Basic Content and Layout Setup**: This script creates directories and placeholder files for layouts, includes, and Sass. Actual content and design should be manually created or added. +- **Step 8: Initial README Documentation**: Creates a basic README file with information about the repository setup and structure. + +### Usage and Customizations + +- Customize the variables (`REPO_NAME`, `JEKYLL_THEME`, `GITHUB_USERNAME`) at the start of the script. +- Make the script executable and run it as described in the previous instructions. + +### Note + +- The script provides a basic setup and structure. Detailed customization of layouts, content, and styles typically requires manual intervention based on specific project requirements. +- Ensure that you have the necessary tools installed and are authenticated where required (like GitHub CLI). + +Certainly! Let's add Step 9 to the script, which will involve configuring the initial continuous integration (CI) tests using GitHub Actions. Additionally, I'll outline any remaining files and configurations that typically need to be set up manually after running the script. + +### Adding Step 9 to the Script: Continuous Integration Tests Setup + +```bash +# ... [previous steps] + +# Step 9: Initial Continuous Integration Tests Setup +echo "name: Jekyll CI Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + html-proofer: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' # or the version you prefer + - name: Install dependencies + run: | + bundle install + - name: Build Jekyll site + run: | + bundle exec jekyll build + - name: Run HTMLProofer + run: | + bundle exec htmlproofer ./_site --check-html --disable-external" > .github/workflows/ci.yml + +git add .github/workflows/ci.yml +git commit -m "Add initial CI tests with HTMLProofer" +git push + +# ... [end of script] + +echo "Repository setup completed with basic CI tests!" +``` + +### Additional Files and Configurations That Need Manual Setup + +After running the script, the following files and configurations typically require manual setup or customization based on the specific needs of the project: + +1. **_config.yml**: Customize the Jekyll configuration file with site-specific settings like base URL, title, email, description, and additional plugins or themes. + +2. **Custom Theme Files**: + - **_layouts/**: Customize or create HTML layouts for different types of pages (e.g., default, post, page). + - **_includes/**: Create and modify reusable components like headers, footers, and navigation bars. + - **_sass/**: Add or modify Sass/CSS files for styling the website. + +3. **Content Creation**: + - **_posts/**: Write and add blog posts in Markdown format. + - **pages/**: Create and add additional content pages (e.g., About, Contact). + +4. **SEO and Analytics Configurations**: Integrate SEO plugins and add analytics tracking codes (like Google Analytics) in `_includes/`, `_layouts/`, or directly in the HTML files. + +5. **Favicon and Site Icons**: Add a `favicon.ico` and other related icons in the root directory or under `assets/images/`. + +6. **Other Static Files**: + - **assets/js/**: Add custom JavaScript files if needed. + - **assets/images/**: Add images used on the site. + +7. **Testing and Quality Assurance**: Further configure CI/CD pipelines for advanced testing, code quality checks, and automated deployment strategies. + +8. **Documentation**: Expand the README and other documentation to cover development guidelines, contribution processes, and detailed explanations of the site's architecture and features. + +9. **Advanced Features**: Implement any advanced Jekyll features or integrations as needed, such as comment systems, search functionality, or third-party APIs. + +By completing these additional steps, you'll have a fully functional, customized Jekyll website, ready for content addition and further development. Remember, while automation can set up the basic structure, the finer aspects of a website like design, content, and specific functionalities often require a more hands-on approach. + +Creating a `_config.yml` file for a Jekyll site with a wide range of functionalities involves including various configurations for themes, plugins, SEO, performance optimizations, and other features. Here's a comprehensive example that you can customize according to your needs: + +```yaml +title: Your Site Title +description: >- # this means to ignore newlines until "baseurl:" + This is your site description. It will be used for SEO purposes. +baseurl: "" # the subpath of your site, e.g. /blog +url: "http://yourdomain.com" # the base hostname & protocol for your site +email: your-email@domain.com + +# Build settings +markdown: kramdown +theme: minima +plugins: + - jekyll-feed + - jekyll-sitemap + - jekyll-seo-tag + +# SEO settings +seo: + name: Your Site Name + description: 'A brief description of your site for SEO purposes' + twitter: + username: yourusername + og_image: '/path/to/default/social-image.jpg' + +# Optional analytics +google_analytics: UA-XXXXXXXXX-X + +# Optional comments +disqus: + shortname: your-disqus-shortname + +# Build optimizations +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ +keep_files: + - .git + - .svn + +# Collections +collections: + my_collection: + output: true + permalink: /:collection/:name + +# Permalinks +permalink: /:year/:month/:day/:title/ + +# Pagination (if using 'jekyll-paginate' or similar) +paginate: 5 +paginate_path: "/page:num/" + +# Sass/SCSS +sass: + sass_dir: _sass + style: compressed + +# Markdown extensions +kramdown: + input: GFM + hard_wrap: false + footnote_nr: 1 + entity_output: as_char + toc_levels: 1..6 + smart_quotes: lsquo,rsquo,ldquo,rdquo + enable_coderay: false + +# Plugins (if you have specific plugins) +plugins_dir: _plugins + +# Default Front Matter +defaults: + - + scope: + path: "" + type: "posts" + values: + layout: "post" + author: "your default author" + +# Site language +lang: en + +# Date and Time Format +date_format: '%b %-d, %Y' + +# Optional feature images for posts +defaults: + - + scope: + path: "" + type: "posts" + values: + image: "/assets/images/default.jpg" + +# Social Media Links +social_links: + twitter: yourtwitterhandle + facebook: yourfacebookpage + github: yourgithubusername + linkedin: yourlinkedinprofile + +# Footer settings +footer: + links: + - title: About + url: /about + - title: Privacy Policy + url: /privacy-policy + - title: Contact + url: /contact +``` + +### Explanation of Key Sections + +- **Basic Settings**: Set your site's title, description, base URL, email, and other essential configurations. +- **Build Settings**: Define the Markdown processor, theme, and plugins you're using. +- **SEO and Analytics**: Configure SEO tags and Google Analytics tracking. +- **Comments**: Integration with Disqus for comments on posts. +- **Build Optimizations**: Exclude files and directories from the build process to improve build performance. +- **Collections**: Define any custom collections beyond posts and pages. +- **Permalinks and Pagination**: Customize how URLs are formed and how pagination works. +- **Sass/SCSS**: Define Sass settings for styling. +- **Markdown Extensions**: Configure the markdown processor settings. +- **Plugins**: Specify the directory for custom plugins. +- **Default Front Matter**: Set default metadata for posts or other document types. +- **Language and Date/Time Format**: Set the language of your site and customize how dates are displayed. +- **Feature Images for Posts**: Set a default feature image for blog posts. +- **Social Media Links**: Add your social media profiles for easy linking. +- **Footer Settings**: Customize the footer with links to various pages. + +Remember to replace placeholder values with your actual site information and preferences. This `_config.yml` is a starting point, and you can extend or modify it based on the specific needs of your Jekyll site. + +In a Jekyll website, the `_layouts` and `_includes` directories play crucial roles. They contain reusable code snippets and templates that define the structure of different types of pages and components used across the site. Here's an outline of a variety of files typically found in these directories: + +### `_layouts` Directory + +The `_layouts` directory contains templates that wrap around your content. They are used to define the HTML structure of different types of pages on your site. + +1. **default.html**: The base template for your site. All other layouts often inherit from this file. It usually includes the site header, footer, and basic HTML structure. + +2. **post.html**: A layout specifically for individual blog posts. It defines how blog posts are displayed, including the title, content, and possibly author information and dates. + +3. **page.html**: Similar to `post.html`, but for standard pages (like About, Contact). This layout might have a different structure or style compared to blog posts. + +4. **home.html**: A layout for the home page of the site. This might include a list of recent blog posts, a welcome message, or featured content. + +5. **archive.html**: Used for archive pages that list blog posts by date, category, or tag. + +6. **category.html** and **tag.html**: Specific layouts for pages that list all posts in a particular category or tagged with a specific tag. + +### `_includes` Directory + +The `_includes` directory contains snippets of code that can be included in layouts and posts. These are often used for repeated content like headers, footers, and navigation bars. + +1. **header.html**: Contains the site's header section. This typically includes the navigation bar and may also contain site branding or identity. + +2. **footer.html**: The site's footer content. This can include copyright notices, links to privacy policy or terms of service, and social media links. + +3. **navigation.html**: Defines the navigation menu of the site. It's often included in `header.html` or directly in `default.html`. + +4. **sidebar.html**: For sites with a sidebar, this file contains its contents, which might include a search box, list of recent posts, or advertisements. + +5. **social-links.html**: A snippet for social media links, which can be included in the footer or header. + +6. **analytics.html**: Contains the site's web analytics code (like Google Analytics), which can be included in the layout templates to appear on every page. + +7. **seo.html**: If you're using additional SEO tags and scripts, they might be included in this file for easy inclusion in your layouts. + +8. **comments.html**: For integrating a comments section (like Disqus) into your blog posts. + +### Customization and Expansion + +Both `_layouts` and `_includes` can be expanded with custom files as needed. For instance, you might have different layouts for different types of blog posts, or you might have includes for unique features like a newsletter signup form or a custom footer for specific sections of your site. + +Remember, the actual files and their contents depend on the specific needs of your website and can vary greatly from one project to another. These directories provide a way to organize and reuse your code efficiently across your Jekyll site. + +The `pages/` directory in a Jekyll website is used for individual, non-post pages like "About", "Contact", and other similar pages. These pages usually have a simpler structure compared to blog posts and often share a common layout. Below is a basic outline for each of the common individual pages you might find in the `pages/` directory: + +### 1. About Page (`about.md`) + +```markdown +--- +layout: page +title: About +permalink: /about/ +--- + +# About Us + +Welcome to [Your Site Name]! Here's a little about us. + +## Our Mission + +[Describe the mission and values of your site or organization.] + +## Our Team + +[Provide information about the team members or key people behind the site.] + +## Our Story + +[Share a brief history or background of your site, company, or project.] +``` + +### 2. Contact Page (`contact.md`) + +```markdown +--- +layout: page +title: Contact +permalink: /contact/ +--- + +# Contact Us + +If you have any questions, feedback, or inquiries, feel free to reach out to us. + +## Get in Touch + +- Email: [your-email@domain.com](mailto:your-email@domain.com) +- Phone: [Your Phone Number] + +## Follow Us + +[Links to social media profiles.] + +## Contact Form + +[If applicable, include a contact form here. This might require additional HTML or integration with a service.] +``` + +### 3. Services Page (`services.md`) + +```markdown +--- +layout: page +title: Services +permalink: /services/ +--- + +# Our Services + +We offer a variety of services to cater to your needs. + +## Service 1 + +[Description of Service 1] + +## Service 2 + +[Description of Service 2] + +## Why Choose Our Services + +[Information about what makes your services unique or desirable.] +``` + +### 4. Portfolio Page (`portfolio.md`) + +```markdown +--- +layout: page +title: Portfolio +permalink: /portfolio/ +--- + +# Our Portfolio + +Take a look at some of our past projects and accomplishments. + +## Project 1 + +[Description and images or links related to Project 1] + +## Project 2 + +[Description and images or links related to Project 2] + +[Continue with more projects as needed.] +``` + +### 5. FAQ Page (`faq.md`) + +```markdown +--- +layout: page +title: FAQ +permalink: /faq/ +--- + +# Frequently Asked Questions + +Here are some common questions we get and their answers. + +## Question 1 + +[Answer to Question 1] + +## Question 2 + +[Answer to Question 2] + +[Continue with more questions and answers as needed.] +``` + +### 6. Privacy Policy (`privacy-policy.md`) + +```markdown +--- +layout: page +title: Privacy Policy +permalink: /privacy-policy/ +--- + +# Privacy Policy + +[Your Company Name] is committed to protecting your privacy. This policy outlines our practices. + +## Information Collection and Use + +[Details about the information collection and usage.] + +## Data Security + +[Information on how data is protected.] + +[Continue with all relevant sections for a privacy policy.] +``` + +### Notes2 + +- Each of these pages starts with YAML front matter, specifying the layout and permalink. +- The content is written in Markdown, making it easy to format text and add links. +- For elements like contact forms or advanced layouts, you might need to integrate HTML or third-party services. +- The structure and content of these pages can be customized to fit the specific needs and identity of your site or organization. + +The `layouts` directory in a Jekyll website contains the HTML templates that define the structure of your site's pages. Based on the previously mentioned common pages, here is how the `layouts` directory might look, along with basic outlines for each layout file: + +### `layouts` Directory Structure + +```bash +_layouts/ +│ +├── default.html # The base layout for your site +├── page.html # Layout for standard pages (e.g., About, Contact) +├── post.html # Layout for blog posts +├── home.html # Layout for the home page +└── ... # Other custom layouts as needed +``` + +### Layout Files Outline + +1. **default.html**: The basic template for your site. It usually includes the header, footer, and a content area where other layouts are inserted. + + ```html + + + + + {{ page.title | escape }} - {{ site.title | escape }} + + + + {% include header.html %} + +
+ {{ content }} +
+ + {% include footer.html %} + + + ``` + +2. **page.html**: A layout for standard pages. It can extend the `default.html` layout and add specific structures or styles for standard pages. + + ```html + --- + layout: default + --- +
+
+

{{ page.title }}

+
+
+ {{ content }} +
+
+ ``` + +3. **post.html**: This layout is used for individual blog posts. It might include elements like the post date, author, and categories/tags. + + ```html + --- + layout: default + --- +
+
+

{{ page.title }}

+ +
+
+ {{ content }} +
+
+ ``` + +4. **home.html**: The layout for the homepage, which might feature a list of recent blog posts, a welcome message, or other elements. + + ```html + --- + layout: default + --- +
+

Welcome to {{ site.title }}

+ +
+ ``` + +### Notes3 + +- The `{{ content }}` variable in these layouts is where the content of your Markdown files will be inserted. +- Each layout typically extends the `default.html` layout to ensure a consistent look across the site. +- You can further customize these layouts with additional HTML, CSS, and JavaScript as needed. +- The specific structure of each layout file depends on the desired look and feel of your website. + +Certainly! Let's expand the `_layouts` directory to illustrate how it might be structured for a Jekyll website with a more diverse range of page types and functionalities. Along with the previously mentioned layouts, additional custom layouts can be created to cater to specific needs or content types of the site. + +### Expanded `_layouts` Directory Structure + +```bash +_layouts/ +│ +├── default.html # The base layout for the site +├── page.html # Layout for standard pages (e.g., About, Contact) +├── post.html # Layout for individual blog posts +├── home.html # Layout for the home page +├── archive.html # Layout for archive pages (e.g., post listings by date or category) +├── category.html # Layout for category listing pages +├── tag.html # Layout for tag listing pages +├── portfolio.html # Custom layout for a portfolio page +└── custom.html # A custom layout for any special page +``` + +### Additional Layout Files Outline + +1. **archive.html**: Used for archive pages to list posts by date, category, etc. + + ```html + --- + layout: default + --- +
+

Archive

+ +
+ ``` + +2. **category.html**: A layout for displaying posts in a specific category. + + ```html + --- + layout: default + --- +
+

Posts in category: {{ page.category }}

+ +
+ ``` + +3. **tag.html**: Similar to `category.html`, but for listing posts with a specific tag. + + ```html + --- + layout: default + --- +
+

Posts tagged with: {{ page.tag }}

+ +
+ ``` + +4. **portfolio.html**: A custom layout for showcasing work or projects. + + ```html + --- + layout: default + --- +
+

My Portfolio

+ +
+ ``` + +5. **custom.html**: A general-purpose custom layout for any unique page requirements. + + ```html + --- + layout: default + --- +
+ +
+ ``` + +### Notes4 + +- Each of these layouts is designed to extend the `default.html` layout to maintain a consistent site-wide header, footer, and styling. +- The content of each layout (like the loop to list posts in `archive.html`, `category.html`, `tag.html`) needs to be dynamically generated using Jekyll's Liquid templating language. +- These layouts can be further customized with additional HTML, CSS, and JavaScript, depending on the specific needs and design of the website. + +Sure, let's expand on the `default.html` and `page.html` layouts in the `_layouts` directory to provide a more detailed structure for each. These expanded layouts will include more HTML and Liquid templating to demonstrate a more functional and styled layout. + +### Expanded `default.html` Layout + +This layout is the base template for your site. It includes the main HTML structure, linking to stylesheets, and placeholders for the header and footer which can be included from the `_includes` directory. + +```html + + + + + {{ page.title | escape }} - {{ site.title | escape }} + + + + + + {% include header.html %} + +
+ {{ content }} +
+ + {% include footer.html %} + + + + +``` + +In this layout: + +- `{{ page.title | escape }}` dynamically sets the page title. +- `{{ '/assets/css/style.css' | relative_url }}` links to a stylesheet in the `assets` directory. +- `{% include header.html %}` and `{% include footer.html %}` include the site's header and footer. +- `{{ content }}` is where the content of other layouts or pages will be injected. +- The `
` tag is used as a container for the main content. + +### Expanded `page.html` Layout + +This layout is for standard pages like 'About' or 'Contact'. It extends the `default.html` layout and can include additional styling or structure specific to standard pages. + +```html +--- +layout: default +--- +
+ +
+ {{ content }} +
+
+``` + +In this layout: + +- `layout: default` extends the `default.html` layout. +- The `
` tag contains the page title. +- `{{ content }}` is where the content of the Markdown file for each page will be placed. +- The layout is wrapped in `
` tags, distinguishing it from other content types like posts. + +### Notes5 + +- These are basic examples. You can add more complexity with CSS classes, JavaScript interactions, and more advanced Liquid logic. +- For a fully functional website, these layouts should be complemented by corresponding include files (like `header.html` and `footer.html`) and a properly structured CSS file. +- The actual structure might vary depending on the specific design and functionality requirements of your site. + +Certainly! Let's expand on the `post.html` and `home.html` layouts in the `_layouts` directory to provide a more detailed view of how these layouts can be structured. + +### Expanded `post.html` Layout + +The `post.html` layout is designed for individual blog posts. It typically includes elements specific to blog posts, such as the publication date, author, categories or tags, and possibly a comments section. + +```html +--- +layout: default +--- +
+
+

{{ page.title }}

+ +
+
+ {{ content }} +
+ {% if page.comments %} +
+ {% include comments.html %} +
+ {% endif %} +
+``` + +In this layout: + +- The post's title and meta information (date, author, categories) are displayed in the header. +- `{{ content }}` is where the content of the blog post will be placed. +- An optional comments section is included at the bottom of the post. + +### Expanded `home.html` Layout + +The `home.html` layout is typically used for the site's landing page. This layout might feature a list of recent blog posts, a welcome message, featured content, or other elements depending on the site's purpose. + +```html +--- +layout: default +--- +
+
+

Welcome to {{ site.title }}

+

{{ site.description }}

+
+
+

Recent Posts

+
    + {% for post in site.posts limit:5 %} +
  • + {{ post.title }} + +
  • + {% endfor %} +
+
+ +
+``` + +In this layout: + +- An introductory section provides a welcome message or summary. +- A list of recent posts is displayed, showing the title and date of each post. +- You can add more sections to highlight other content or features of your site. + +### Notes6 + +- The above layouts are examples and can be further customized with additional HTML, CSS classes, and JavaScript to match the specific design and functionality requirements of your site. +- The layouts assume the presence of certain site and page variables (like `site.title`, `site.description`, `page.date`, etc.), which should be defined in your site's `_config.yml` file or in the front matter of your posts. +- These examples use simple Liquid templating for dynamic content generation. You can extend this with more complex logic as needed. + +Absolutely, let's expand on the `archive.html` and `category.html` layouts in the `_layouts` directory. These layouts are particularly useful for organizing and displaying collections of posts, such as archives by date or posts by category. + +### Expanded `archive.html` Layout + +The `archive.html` layout is typically used for displaying a list of posts, often organized by date. This layout can be used for a dedicated archive page that lists all posts or organizes them into years or months. + +```html +--- +layout: default +--- +
+

Archive

+ {% for post in site.posts %} + {% unless post.previous %} +

{{ post.date | date: '%Y' }}

+
    + {% endunless %} + +
  • + {{ post.title }} ({{ post.date | date: "%b %-d, %Y" }}) +
  • + + {% if post.next %} + {% unless post.next.date | date: '%Y' == post.date | date: '%Y' %} +
+

{{ post.next.date | date: '%Y' }}

+
    + {% endunless %} + {% else %} +
+ {% endif %} + {% endfor %} +
+``` + +In this layout: + +- Posts are grouped by year, with a header for each year. +- Each post is listed with its title and date. +- The Liquid logic checks for changes in the year to start a new group. + +### Expanded `category.html` Layout + +The `category.html` layout is used for listing posts that belong to a specific category. This can be used for category index pages. + +```html +--- +layout: default +--- +
+

Posts in '{{ page.category }}' category

+
    + {% for post in site.categories[page.category] %} +
  • + {{ post.title }} + +
  • + {% endfor %} +
+
+``` + +In this layout: + +- The page displays a title indicating the category being viewed. +- It lists all posts belonging to the specified category. +- Each post is displayed with a link to the post and its publication date. + +### Notes7 + +- These layouts assume that your posts have properly set categories and dates in their front matter. +- The `archive.html` layout uses somewhat complex Liquid logic to group posts by year. This can be adjusted based on how you want to structure your archive (e.g., monthly, by tag, etc.). +- The `category.html` layout dynamically fetches posts from the specified category, which should match the category name in the post's front matter. +- As with all layouts, these can be further customized with additional styling or functionality as needed. + +Certainly! Let's proceed with expanding the `tag.html` and `portfolio.html` layouts in the `_layouts` directory. These layouts are useful for showcasing posts filtered by specific tags and for displaying a portfolio of projects or work samples. + +### Expanded `tag.html` Layout + +The `tag.html` layout is similar to the `category.html` layout but is used for displaying posts associated with a specific tag. This layout is ideal for tag index pages, where visitors can see all posts tagged with a particular topic. + +```html +--- +layout: default +--- +
+

Posts tagged with '{{ page.tag }}'

+
    + {% for post in site.tags[page.tag] %} +
  • + {{ post.title }} + +
  • + {% endfor %} +
+
+``` + +In this layout: + +- The page title dynamically reflects the tag being viewed. +- It lists all posts that have been tagged with the specified tag. +- Each listed post includes a hyperlink to the post and the date it was published. + +### Expanded `portfolio.html` Layout + +The `portfolio.html` layout is a custom layout designed for displaying a portfolio. It can showcase work samples, projects, or any other content that fits into a portfolio format. + +```html +--- +layout: default +--- +
+

My Portfolio

+
+ {% for item in site.data.portfolio %} +
+

{{ item.title }}

+

{{ item.description }}

+ Learn more + +
+ {% endfor %} +
+
+``` + +In this layout: + +- The layout starts with a title for the portfolio section. +- It uses a loop to iterate over items in a `portfolio` data file (assumed to be located at `_data/portfolio.yml`). +- Each portfolio item displays a title, description, and a link for more information. Additional content like images, videos, or external links can be added as needed. + +### Notes8 + +- The `tag.html` layout is ideal for blogs or sites with a variety of content topics, allowing users to filter content by tags. +- For the `portfolio.html` layout, you will need to create a corresponding data file (`_data/portfolio.yml`) or adjust the loop to pull content from the appropriate source. +- These layouts are basic structures and can be enhanced with CSS for styling and JavaScript for interactive elements. + +The final layout in the expanded `_layouts` directory is the `custom.html` layout. This layout is a general-purpose template that can be tailored for any specific page that doesn't fit into the standard categories like posts, pages, archives, or portfolios. It offers flexibility for unique design or content requirements. + +### Expanded `custom.html` Layout + +The `custom.html` layout can be adapted for a wide range of uses, such as a special landing page, a unique layout for a particular section of the site, or any other custom content structure. + +```html +--- +layout: default +--- +
+

{{ page.title }}

+
+ {{ content }} +
+ +
+``` + +In this layout: + +- It extends the `default.html` layout to maintain site-wide consistency. +- The page title is dynamically set based on the front matter of the page using this layout. +- The `{{ content }}` placeholder is where the specific Markdown or HTML content of the page will be inserted. +- Additional HTML and Liquid templating can be added to suit the specific needs of the custom page. + +### Usage Example for `custom.html` + +An example use case for `custom.html` could be a special campaign landing page that requires a unique layout separate from the rest of the site. You could include elements like specialized forms, unique styling, or interactive elements that are not part of the site's standard template set. + +### Notes9 + +- Since `custom.html` is a template for unique cases, the specific HTML and Liquid code you add will depend heavily on the individual requirements of the page it's intended for. +- The flexibility of the `custom.html` layout allows for creative freedom, but it's important to ensure that any custom code added still maintains overall site performance and accessibility standards. +- Like all other layouts, it's recommended to test the layout across different devices and browsers to ensure compatibility and responsiveness. + +Creating a templatized and expanded `custom.html` layout involves designing a more complex structure that can accommodate various types of custom content. This layout can include sections for featured content, multimedia elements, specialized calls-to-action, or any unique features that are not part of the standard page templates. + +Here’s an example of a more detailed `custom.html` layout: + +### Expanded `custom.html` Layout-2 + +```html +--- +layout: default +--- +
+
+
+

{{ page.title }}

+ {% if page.subtitle %} +

{{ page.subtitle }}

+ {% endif %} +
+
+ +
+
+ {{ content }} +
+
+ + {% if page.featured_sections %} + + {% endif %} + + {% if page.testimonials %} +
+
+

What People Say

+
    + {% for testimonial in page.testimonials %} +
  • +
    {{ testimonial.quote }}
    + {{ testimonial.author }} +
  • + {% endfor %} +
+
+
+ {% endif %} + + +
+``` + +### Features of the Expanded `custom.html` Layout + +- **Custom Header**: A header section with an optional background image (set via front matter) and a title/subtitle. +- **Intro Section**: A section for introductory content, populated by the page's Markdown content. +- **Featured Sections**: Dynamically generated sections that can feature different aspects of your content or services. This could include images, descriptions, and links. +- **Testimonials**: A section for displaying testimonials if provided in the front matter. + +### Front Matter Example for a Custom Page + +Here’s an example of how the front matter for a page using this `custom.html` layout might look: + +```markdown +--- +layout: custom +title: "Welcome to Our Special Campaign" +subtitle: "Join us in our effort to make a difference" +header_image: "/assets/images/custom-header.jpg" +featured_sections: + - title: "Feature 1" + description: "Description of feature 1." + image: "/assets/images/feature1.jpg" + link: "/feature-1/" + - title: "Feature 2" + description: "Description of feature 2." + link: "/feature-2/" +testimonials: + - quote: "This is an amazing project!" + author: "Jane Doe" + - quote: "Truly a remarkable experience." + author: "John Smith" +--- + +Your main content goes here. This will be displayed in the intro section. +``` + +### Notes10 + +- The actual HTML structure and classes should be styled according to your site's CSS. +- The layout is flexible and can be further modified to include more sections or different types of content. +- This layout assumes that certain fields are provided in the front matter, like `header_image`, `featured_sections`, and `testimonials`. If these fields are not used, the corresponding sections won’t be displayed. + +To fully utilize the expanded `custom.html` layout, you'll need additional assets like CSS for styling, JavaScript for functionality, and images for visual elements. Here's an outline of what these assets might include: + +### 1. CSS (Cascading Style Sheets) + +Create a CSS file to style the custom page layout. This file should be placed in the `assets/css/` directory. Here's an example of what the CSS might look like: + +**File:** `assets/css/custom.css` + +```css +.custom-page { + /* Styles for the custom page */ +} + +.custom-header { + background-size: cover; + text-align: center; + color: white; + padding: 50px 0; +} + +.header-content h1 { + font-size: 2.5em; +} + +.intro-section { + padding: 20px; + background-color: #f8f8f8; +} + +.featured-sections { + padding: 20px 0; +} + +.featured-section { + margin-bottom: 20px; +} + +.testimonials { + background-color: #e9ecef; + padding: 20px; +} + +.testimonials blockquote { + font-style: italic; +} + +/* Additional styles as needed */ +``` + +### 2. JavaScript + +You might want to add some interactive functionality to your custom page, like a slider, modal pop-ups, or dynamic content loading. For this, create a JavaScript file in the `assets/js/` directory. + +**File:** `assets/js/custom.js` + +```javascript +// JavaScript for custom page interactions +document.addEventListener('DOMContentLoaded', function() { + // Your custom JavaScript code + // Example: document.querySelector('.some-element').addEventListener(...) +}); +``` + +### 3. Images + +Place any images used in the custom page layout in the `assets/images/` directory. For example, if you referenced `custom-header.jpg` in your front matter, make sure this image is located at `assets/images/custom-header.jpg`. + +### Integrating These Assets into Your Site + +To use these assets, you need to link the CSS and JavaScript files in your `default.html` layout (or directly in your `custom.html` layout if you prefer). + +Add the following lines to the head section of your `default.html` layout for the CSS: + +```html + +``` + +And before the closing `` tag for the JavaScript: + +```html + +``` + +### Notes11 + +- Make sure your CSS and JavaScript match the classes and IDs used in your `custom.html` layout. +- The CSS and JavaScript provided here are basic examples. Depending on your custom page’s design and functionality, you might need more complex or specific styling and scripting. +- Always test your custom page on various devices and browsers to ensure that the styling and functionality work as intended. + +Certainly! Below are examples for the `analytics.html` and `comments.html` include files for a Jekyll website: + +### `analytics.html` + +This file is used to include web analytics code, such as Google Analytics, into your site. It's typically included in the `` section of your layout files. + +**_includes/analytics.html:** + +```html +{% if site.google_analytics %} + + +{% endif %} +``` + +In this file: + +- The Google Analytics tracking code is included only if the `google_analytics` variable is set in the site's `_config.yml`. +- Replace `site.google_analytics` with your actual Google Analytics tracking ID. + +### `comments.html` + +This file is for integrating a comments section, such as Disqus, into your blog posts. It's typically included at the end of the `post.html` layout. + +**_includes/comments.html:** + +```html +{% if page.comments %} +
+ + +{% endif %} +``` + +In this file: + +- Disqus is only loaded if `comments` is enabled in the page's front matter. +- The Disqus shortname should be set in the site's `_config.yml` (`site.disqus.shortname`). +- The script dynamically loads the Disqus comments for the page, using the page's URL and unique identifier for thread comments. + +### Usage in Layouts + +To use these include files, you would typically insert them into your layout files where appropriate. For example: + +- In your `default.html` layout, you can include the analytics script within the `` tag by adding `{% include analytics.html %}`. +- In your `post.html` layout, you can add the comments section near the end of the content area by including `{% include comments.html %}`. + +### Notes12 + +- For Google Analytics, ensure you have signed up for Google Analytics and have your unique tracking ID. +- For Disqus, sign up for an account and obtain your unique Disqus shortname to use in your `_config.yml`. +- These includes allow for a modular approach, meaning you can easily include or exclude features like analytics and comments as needed. + +Certainly! Below are examples for the `analytics.html` and `comments.html` include files for a Jekyll website: + +### `analytics.html` 1 + +This file is used to include web analytics code, such as Google Analytics, into your site. It's typically included in the `` section of your layout files. + +**_includes/analytics.html:** + +```html +{% if site.google_analytics %} + + +{% endif %} +``` + +In this file: + +- The Google Analytics tracking code is included only if the `google_analytics` variable is set in the site's `_config.yml`. +- Replace `site.google_analytics` with your actual Google Analytics tracking ID. + +### `comments.html` 1 + +This file is for integrating a comments section, such as Disqus, into your blog posts. It's typically included at the end of the `post.html` layout. + +**_includes/comments.html:** + +```html +{% if page.comments %} +
+ + +{% endif %} +``` + +In this file: + +- Disqus is only loaded if `comments` is enabled in the page's front matter. +- The Disqus shortname should be set in the site's `_config.yml` (`site.disqus.shortname`). +- The script dynamically loads the Disqus comments for the page, using the page's URL and unique identifier for thread comments. + +### Usage in Layouts 1 + +To use these include files, you would typically insert them into your layout files where appropriate. For example: + +- In your `default.html` layout, you can include the analytics script within the `` tag by adding `{% include analytics.html %}`. +- In your `post.html` layout, you can add the comments section near the end of the content area by including `{% include comments.html %}`. + +### Notes13 + +- For Google Analytics, ensure you have signed up for Google Analytics and have your unique tracking ID. +- For Disqus, sign up for an account and obtain your unique Disqus shortname to use in your `_config.yml`. +- These includes allow for a modular approach, meaning you can easily include or exclude features like analytics and comments as needed. + +Absolutely! The `header.html` and `footer.html` are crucial include files in a Jekyll website, as they typically appear on every page. The `header.html` includes the site's main navigation and branding, while the `footer.html` typically contains copyright information, additional navigation, and social links. + +### `header.html` + +This file typically contains the site's header section, including branding (like a logo or site name) and the main navigation menu. It's included at the top of the layout files. + +**_includes/header.html:** + +```html + +``` + +In this file: + +- The site title links back to the home page. +- The `navigation.html` include (which contains the site's navigation menu) is included here. + +### `footer.html` + +The `footer.html` include contains the site's footer content, which often includes copyright notices, additional navigation links, and social media links. + +**_includes/footer.html:** + +```html +
+
+

© {{ site.time | date: '%Y' }} {{ site.title }}. All rights reserved.

+ {% if site.footer_links %} + + {% endif %} + {% include social-links.html %} +
+
+``` + +In this file: + +- The copyright year is dynamically updated to the current year. +- Additional footer links can be added through the `footer_links` variable in `_config.yml`. +- The `social-links.html` include (which would contain social media links) is included at the bottom. + +### Notes14 + +- Both `header.html` and `footer.html` include references to other includes (`navigation.html` and `social-links.html`), which you will also need to create. +- The structure and content of these files can be further customized with CSS in your site's stylesheet for styling and branding. +- The inclusion of these files in your layout files allows for consistent header and footer content across your entire site. + +Let's proceed with the `navigation.html` and `seo.html` include files for a Jekyll website. These files serve specific purposes: `navigation.html` for the site's menu, and `seo.html` for search engine optimization enhancements. + +### `navigation.html` + +This file contains the site's navigation menu. It's typically included in the `header.html` file. + +**_includes/navigation.html:** + +```html + +``` + +In this file: + +- A basic navigation menu is created with links to the Home, About, Blog, and Contact pages. +- The `relative_url` filter ensures that the links work correctly even if the site is hosted in a subdirectory. + +### `seo.html` + +This file is used for adding SEO-related tags like meta tags, Open Graph tags for social media, etc. It's typically included in the `` section of the layout files. + +**_includes/seo.html:** + +```html + + + + + + + + + + +``` + +In this file: + +- Meta tags are set for the description and canonical URL. +- Open Graph (OG) tags are used to define how pages appear when shared on social media. +- Twitter cards tags are included for better display on Twitter. +- The content for these tags is dynamically set based on the page's front matter or the site's default settings in `_config.yml`. + +### Usage in Layouts3 + +To use these include files effectively: + +- Place the `{% include navigation.html %}` line in your `header.html` or directly in your layout files where you want the navigation menu to appear. +- Add `{% include seo.html %}` within the `` section of your layout files to integrate SEO enhancements. + +### Notes15 + +- For `navigation.html`, ensure that the URLs correspond to the actual pages of your site. You might need to adjust the paths based on your site’s structure. +- In `seo.html`, the `default` filter is used to provide fallback content from the site's configuration if specific page content is not provided, ensuring that each page has basic SEO tags even if not explicitly set in the page's front matter. +- These are basic templates and may need to be expanded or modified based on specific SEO strategies or navigation requirements. + +Certainly! The last two include files, `sidebar.html` and `social-links.html`, are used to add a sidebar and social media links to your Jekyll site, respectively. Here are examples of how these files might be structured: + +### `sidebar.html` + +This file contains the contents of the sidebar, which might include a search box, a list of recent posts, links to categories, or advertisements. It's typically included in the layout files where you want a sidebar to appear (like in a blog layout). + +**_includes/sidebar.html:** + +```html + +``` + +In this file: + +- A simple search form is included. (Note: This requires additional setup for a search functionality.) +- A section lists the five most recent posts. +- You can add more sections as needed, like categories, tags, or advertisements. + +### `social-links.html` + +This file contains social media links. It's often included in the header, footer, or sidebar of your site. + +**_includes/social-links.html:** + +```html + +``` + +In this file: + +- The social media links are dynamically generated based on the usernames specified in your site's `_config.yml`. +- This template can be expanded to include links to other social media platforms as needed. + +### Usage in Layouts4 + +To use these include files: + +- Add `{% include sidebar.html %}` in your layout files where you want the sidebar to appear, typically next to the main content area in a two-column layout. +- Place `{% include social-links.html %}` in the footer, header, or sidebar as per your site design. + +### Notes16 + +- The `sidebar.html` can be further customized with additional content based on your site’s needs. +- In `social-links.html`, ensure that the corresponding usernames for each social media platform are set in your site's `_config.yml`. +- Styling for these elements should be defined in your site’s CSS files to ensure they match the overall design of your site. + +Sure, here are expanded versions of the `sidebar.html` and `social-links.html` files with additional HTML content: + +### Expanded `sidebar.html` + +```html + +``` + +### Expanded `social-links.html` + +```html + +``` + +In these expanded versions: + +- The `sidebar.html` includes sections for a search box, recent posts, categories, tags, and an advertisement or custom widget area. +- The `social-links.html` includes icons (from Font Awesome) for each social media link and additional platforms like YouTube. (Note: Font Awesome or similar library needs to be included in your site for icons to display.) + +Continuing the expansion of the `social-links.html` file, more social media platforms can be added to enhance your site's connectivity. Here are additional elements to include: + +```html + +``` + +In this expansion: + +- Additional social platforms like Pinterest, Snapchat, TikTok, Reddit, and Discord are included. +- Each platform is represented by its respective Font Awesome icon for visual consistency. +- `aria-label` attributes are used for accessibility, providing a text description of the link's purpose. +- Note that the actual usernames or links for these platforms must be defined in your site's `_config.yml` file to be rendered correctly. + +This expansion offers a comprehensive range of social media links, enhancing the website's social media presence and connectivity. + +Certainly! Let's continue expanding the `social-links.html` with more social media platforms and relevant links: + +```html + +``` + +In this further expansion: + +- Added platforms include Vimeo, Flickr, Tumblr, Spotify, and SoundCloud. +- Each platform's link is accompanied by a corresponding Font Awesome icon. +- `aria-label` is used for each link for accessibility purposes. +- As before, ensure the usernames are correctly set in the site's `_config.yml`. + +This broadens the range of social media platforms, catering to various content types and audiences, from video and photography to blogging and music streaming. + +Certainly! Let's continue expanding the `social-links.html` file with more social media platforms. Here's an extended version including additional social media links: + +```html + +``` + +In this further expansion: + +- Added platforms include Google+ (though deprecated, some sites might still want it for legacy reasons), WhatsApp, Telegram, Medium, GitHub, Dribbble, and Behance. +- Each platform's link is accompanied by a corresponding Font Awesome icon for visual representation. +- `aria-label` is used for each link for accessibility, providing a text description of the link's purpose. +- Ensure that the necessary Font Awesome icons for each platform are available in the version of Font Awesome you're using. + +This expansion provides a comprehensive set of social media platforms, offering various ways for users to connect with the site on their preferred platforms. + +Certainly! Let's continue expanding the `social-links.html` file with more social media platforms. Here's an extended version including additional social media links: + +```html + +``` + +In this further expansion: + +- Added platforms include Google+ (though deprecated, some sites might still want it for legacy reasons), WhatsApp, Telegram, Medium, GitHub, Dribbble, and Behance. +- Each platform's link is accompanied by a corresponding Font Awesome icon for visual representation. +- `aria-label` is used for each link for accessibility, providing a text description of the link's purpose. +- Ensure that the necessary Font Awesome icons for each platform are available in the version of Font Awesome you're using. + +This expansion provides a comprehensive set of social media platforms, offering various ways for users to connect with the site on their preferred platforms. + +Certainly! Here's a list of some popular social media platforms that haven't been included in your expanded `social-links.html` so far: + +1. **Weibo**: A popular Chinese microblogging (weibo) site, similar to Twitter. +2. **QQ**: A popular messaging app in China, also offering a range of other services. +3. **WeChat (Weixin)**: A multi-purpose messaging, social media, and mobile payment app widely used in China. +4. **Line**: A popular messaging app in Japan and other parts of Southeast Asia. +5. **KakaoTalk**: A widely used messaging app in South Korea. +6. **VK (VKontakte)**: The largest social networking service in Russia and surrounding countries. +7. **Xing**: A professional network, similar to LinkedIn, popular in Germany, Austria, and Switzerland. +8. **Badoo**: A dating-focused social network, popular in Europe and Latin America. +9. **Mixi**: A Japanese social networking service. +10. **Zalo**: A Vietnamese messaging app with social features. +11. **Odnoklassniki (OK.ru)**: A social networking site popular in Russia and former Soviet republics. +12. **Vero**: A social platform with a focus on providing a natural and ad-free experience. +13. **Clubhouse**: An audio-chat social networking app that gained popularity for its unique voice-based interaction. +14. **Mastodon**: A free and open-source self-hosted social networking service. It's part of the Fediverse, an ensemble of federated (i.e. interconnected) servers. +15. **Signal**: Known for its privacy-focused messaging, but it also includes features to create and join groups, somewhat akin to social networking. + +Each of these platforms has its own unique features and user base, and their relevance for inclusion in your `social-links.html` would depend on your target audience and geographical focus. + +Certainly! Let's expand the `sidebar.html` to include more detailed sections for categories, tags, and advertisements. This will enhance the functionality and content of the sidebar on your Jekyll site. + +```html + +``` + +In this expanded version: + +- **Categories**: A list of blog categories is dynamically generated, each linking to a category page. +- **Tags**: Similar to categories, a dynamic list of blog tags, each linking to a tag page. +- **Advertisements**: A section for displaying ads. This can be filled with images, affiliate links, or ad network scripts. + +Each section serves to enrich the user experience and functionality of the sidebar, making it a versatile tool for navigation and engagement on your site. + +The `assets` directory in a Jekyll website is used to store various static files like stylesheets, JavaScript files, images, and sometimes downloadable content (like PDFs). Here's an outline of a typical `assets` directory structure along with examples of files that you might find in each subdirectory: + +### `assets` Directory Structure + +```bash +assets/ +│ +├── css/ # Directory for CSS files +│ ├── main.css # Main stylesheet for the site +│ └── custom.css # Custom stylesheet for additional styling +│ +├── js/ # Directory for JavaScript files +│ ├── main.js # Main JavaScript file +│ └── custom.js # Custom JavaScript file for additional scripts +│ +├── images/ # Directory for image files +│ ├── logo.png # Logo of the site +│ ├── banner.jpg # Banner image +│ └── icons/ # Subdirectory for icons +│ ├── icon-1.svg +│ └── icon-2.png +│ +└── fonts/ # Directory for custom fonts + ├── font-1.woff + └── font-2.ttf +``` + +### Contents of the `assets` Directory + +1. **CSS (Cascading Style Sheets) Directory (`css/`)**: + - `main.css`: This is the primary stylesheet file where you would define the global styles for your site. + - `custom.css`: An additional CSS file for overriding styles or adding new styles that are not part of the main stylesheet. + +2. **JavaScript Directory (`js/`)**: + - `main.js`: The main JavaScript file where you would write your site's primary JavaScript or include frameworks and libraries. + - `custom.js`: Additional JavaScript file for custom scripts that extend the functionality of your site. + +3. **Images Directory (`images/`)**: + - Contains all the image files used throughout the site, like logos, banners, and content images. + - The `icons/` subdirectory can be used to organize smaller icon files. + +4. **Fonts Directory (`fonts/`)**: + - If you're using custom fonts that are not loaded from external sources (like Google Fonts), they can be stored in this directory. + - Includes various font formats like `.woff`, `.woff2`, `.ttf`, etc. + +### Usage in Jekyll Site + +- CSS and JavaScript files are typically linked in your layout files, within the `` tag for CSS and before the closing `` tag for JavaScript. +- Image files are used throughout your site's posts, pages, and layout files. +- Custom fonts can be included in your CSS files using `@font-face` rules. + +### Notes17 + +- The structure of the `assets` directory can vary based on the complexity and needs of your website. +- It's important to organize these assets well for maintainability and performance optimization, such as minimizing CSS and JavaScript files for production. + +To use fonts from Google Fonts in your Jekyll site, you don't usually download them directly to your `assets/fonts` directory. Instead, you typically include them via a link in your HTML or import them in your CSS. This approach allows you to leverage Google's CDN for font delivery, which can be more efficient. + +Here's how you can include Google Fonts in your Jekyll site: + +### Including Google Fonts in HTML + +1. Go to [Google Fonts](https://fonts.google.com/). +2. Select the fonts you want to use and add them to your collection. +3. Once you've chosen your fonts, you'll be given an HTML link to include in your site. + + For example, if you chose Roboto, the link provided by Google Fonts might look like this: + + ```html + + ``` + +4. Place this `` in the `` section of your HTML (or within the `` section of your main layout file in Jekyll). + +### Including Google Fonts in CSS + +Alternatively, you can include Google Fonts in your CSS using an `@import` statement. + +```css +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); +``` + +Then, use the font in your CSS: + +```css +body { + font-family: 'Roboto', sans-serif; +} +``` + +### Notes18 + +- When choosing fonts, consider the weights and styles you need (e.g., italic, bold). Including too many can impact the performance of your site. +- Place the `@import` at the top of your CSS file if using the CSS method to prevent any rendering blocking issues. +- Google Fonts provides a "Load time" indicator to help you understand the impact of adding multiple font weights and styles on page load times. +- While this approach uses Google's CDN, you can also download the font files from Google Fonts and host them directly on your site if needed, although this is less common and can increase your site's bandwidth usage. + +To use fonts from Google Fonts in your Jekyll site, you don't usually download them directly to your `assets/fonts` directory. Instead, you typically include them via a link in your HTML or import them in your CSS. This approach allows you to leverage Google's CDN for font delivery, which can be more efficient. + +Here's how you can include Google Fonts in your Jekyll site: + +### Including Google Fonts in HTML 2 + +1. Go to [Google Fonts](https://fonts.google.com/). +2. Select the fonts you want to use and add them to your collection. +3. Once you've chosen your fonts, you'll be given an HTML link to include in your site. + + For example, if you chose Roboto, the link provided by Google Fonts might look like this: + + ```html + + ``` + +4. Place this `` in the `` section of your HTML (or within the `` section of your main layout file in Jekyll). + +### Including Google Fonts in CSS 2 + +Alternatively, you can include Google Fonts in your CSS using an `@import` statement. + +```css +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); +``` + +Then, use the font in your CSS: + +```css +body { + font-family: 'Roboto', sans-serif; +} +``` + +### Notes19 + +- When choosing fonts, consider the weights and styles you need (e.g., italic, bold). Including too many can impact the performance of your site. +- Place the `@import` at the top of your CSS file if using the CSS method to prevent any rendering blocking issues. +- Google Fonts provides a "Load time" indicator to help you understand the impact of adding multiple font weights and styles on page load times. +- While this approach uses Google's CDN, you can also download the font files from Google Fonts and host them directly on your site if needed, although this is less common and can increase your site's bandwidth usage. + +Yes, Bootstrap can definitely be used in a Jekyll site for both JavaScript and CSS. Bootstrap is a popular front-end framework that makes it easy to create responsive and well-designed websites. Integrating Bootstrap into a Jekyll site involves including Bootstrap's CSS and JavaScript files, either by using a CDN or by downloading them and including them in your project. + +### Using Bootstrap via CDN + +The easiest way to integrate Bootstrap is through a Content Delivery Network (CDN). Here's how you can do it: + +1. **Include Bootstrap CSS**: Add the Bootstrap CSS link in the `` section of your HTML layout file (typically in `_layouts/default.html` in Jekyll): + + ```html + + ``` + +2. **Include Bootstrap JavaScript**: Place the Bootstrap JavaScript link before the closing `` tag in the same layout file. Bootstrap's JavaScript requires jQuery and Popper.js, so you'll need to include those as well: + + ```html + + + + ``` + +### Using Bootstrap via Local Files + +Alternatively, you can download Bootstrap and include it in your project files: + +1. **Download Bootstrap**: Go to the [Bootstrap website](https://getbootstrap.com/) and download the compiled CSS and JS files. + +2. **Add Files to Your Project**: Place the downloaded CSS and JS files in the appropriate directories (`assets/css` and `assets/js`). + +3. **Link to Your Files in Your HTML Layout**: + + In the `` section of your layout file: + + ```html + + ``` + + Before the closing `` tag: + + ```html + + + + ``` + +### Notes20 + +- Ensure that you are using compatible versions of jQuery, Popper.js, and Bootstrap when including these libraries. +- Using a CDN is generally preferred for common libraries like Bootstrap due to its benefits in terms of faster load times and reduced server load. +- Remember to test your site after integrating Bootstrap to ensure that your existing styles and scripts work well with the framework. + +When using Bootstrap via a CDN in your Jekyll site, the `main.js` file in your `assets/js` directory might not need to directly reference Bootstrap's JavaScript, as Bootstrap's functionality will be included via the CDN links in your HTML layout. However, you can still use `main.js` to add your own custom JavaScript or to manipulate Bootstrap components programmatically. + +Here's an example of what your `main.js` file could contain when Bootstrap is included via a CDN: + +### `assets/js/main.js` + +```javascript +document.addEventListener('DOMContentLoaded', function() { + // Example: Initializing a Bootstrap tooltip + if (window.bootstrap && bootstrap.Tooltip) { + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) + tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl) + }); + } + + // Custom JavaScript code + // ... + + // Example: Handling a click event on a Bootstrap button + document.querySelectorAll('.example-button').forEach(button => { + button.addEventListener('click', function() { + alert('Button clicked!'); + }); + }); + + // More custom JavaScript code + // ... +}); +``` + +In this `main.js` file: + +- We check for the presence of Bootstrap's JavaScript (`window.bootstrap`) before initializing any Bootstrap components (e.g., tooltips). +- Custom JavaScript functionalities can be added, such as event listeners or DOM manipulations. +- You can interact with Bootstrap components using Bootstrap's methods and classes as documented in Bootstrap's documentation. + +### Notes21 + +- This is a basic example to demonstrate how you might use a custom `main.js` alongside Bootstrap included via a CDN. Your actual usage will depend on the specific functionalities and interactions required by your site. +- Ensure that `main.js` is included in your HTML layout (typically in `_layouts/default.html`), usually before the closing `` tag. +- Since Bootstrap's JavaScript is loaded from the CDN, ensure that your `main.js` is included after Bootstrap's script tags in your HTML layout to avoid any dependency issues. + +Absolutely! Let's expand the `main.js` file with more examples of custom JavaScript functionalities that you might use in a Jekyll site alongside Bootstrap (served via CDN). This can include event handling, dynamic content manipulation, and utilizing Bootstrap's JavaScript components. + +### Expanded `assets/js/main.js` + +```javascript +document.addEventListener('DOMContentLoaded', function() { + // Initializing Bootstrap Tooltips + if (window.bootstrap && bootstrap.Tooltip) { + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); + tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl); + }); + } + + // Event listener for Bootstrap Modal + var myModal = document.getElementById('myModal'); + if (myModal) { + myModal.addEventListener('shown.bs.modal', function () { + console.log('Modal is shown!'); + }); + } + + // Custom JavaScript for toggling classes + var toggleButton = document.getElementById('toggle-button'); + if (toggleButton) { + toggleButton.addEventListener('click', function() { + document.body.classList.toggle('dark-mode'); + }); + } + + // Dynamic content loading + var loadMoreButton = document.getElementById('load-more'); + if (loadMoreButton) { + loadMoreButton.addEventListener('click', function() { + // Example: Ajax call to load more content + // Fetch more data and append it to the DOM + console.log('Load more content here...'); + }); + } + + // Handling Bootstrap Carousel events + var myCarousel = document.querySelector('#myCarousel'); + if (myCarousel) { + myCarousel.addEventListener('slide.bs.carousel', function (e) { + console.log('Carousel slide event!'); + // Additional carousel handling code + }); + } + + // More custom JavaScript code + // ... +}); +``` + +In this expanded `main.js` file: + +- Bootstrap tooltips are initialized for elements marked with `data-bs-toggle="tooltip"`. +- An event listener is set up for a Bootstrap modal, logging a message when the modal is shown. +- A simple class toggle mechanism is demonstrated (e.g., toggling a dark mode class on the `body`). +- An example event listener for a 'Load More' button illustrates how you might dynamically load additional content. +- Carousel events are handled with an example of a slide event in Bootstrap's carousel component. + +### Notes22 + +- This file uses examples that assume certain HTML elements and Bootstrap components are present in your templates. Adjust the JavaScript according to your actual HTML structure and IDs. +- The Bootstrap components and events used here are based on Bootstrap's documentation. Refer to the specific version of Bootstrap you are using for accurate information on component usage and event handling. +- Always test your JavaScript thoroughly to ensure it interacts correctly with the Bootstrap components and other parts of your site. + +Certainly! Let's expand the `main.js` file further with additional custom JavaScript functionalities. These examples will showcase more complex interactions and features that might be useful in a Jekyll site, enhancing user engagement and interactivity. + +### Further Expanded `assets/js/main.js` + +```javascript +document.addEventListener('DOMContentLoaded', function() { + // Previous JavaScript code + // ... + + // Smooth Scrolling for Anchor Links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); + }); + + // Collapsible sections - for FAQs or similar sections + document.querySelectorAll('.collapsible').forEach(collapsible => { + collapsible.addEventListener('click', function() { + this.classList.toggle('active'); + var content = this.nextElementSibling; + if (content.style.maxHeight){ + content.style.maxHeight = null; + } else { + content.style.maxHeight = content.scrollHeight + "px"; + } + }); + }); + + // Image Gallery - Lightbox effect + document.querySelectorAll('.gallery-item').forEach(item => { + item.addEventListener('click', function() { + var src = this.getAttribute('data-src'); + var lightboxImage = document.getElementById('lightbox-image'); + if (lightboxImage) { + lightboxImage.src = src; + // Code to show lightbox + } + }); + }); + + // Form Validation before Submit + var form = document.getElementById('contact-form'); + if (form) { + form.addEventListener('submit', function(event) { + if (!form.checkValidity()) { + event.preventDefault(); + event.stopPropagation(); + } + form.classList.add('was-validated'); + }, false); + } + + // Dynamically loading script + var loadScriptButton = document.getElementById('load-script'); + if (loadScriptButton) { + loadScriptButton.addEventListener('click', function() { + var script = document.createElement('script'); + script.src = 'path/to/your/dynamic/script.js'; + document.head.appendChild(script); + }); + } + + // More custom JavaScript code + // ... +}); +``` + +In this further expanded `main.js` file: + +- **Smooth Scrolling**: Adds smooth scrolling to anchor links for a more polished user experience. +- **Collapsible Sections**: For creating FAQ sections or similar collapsible content. +- **Image Gallery Lightbox**: A simple lightbox effect for image galleries. +- **Form Validation**: Basic client-side validation for forms before submission. +- **Dynamically Loading Script**: An example of loading an external script file dynamically, which can be useful for loading resources on demand. + +### Notes23 + +- These are generic examples intended to provide a starting point for common website functionalities. Tailor them to fit the specific needs and structure of your Jekyll site. +- Test each functionality thoroughly to ensure it works as expected and integrates seamlessly with your site’s design and other scripts. +- Consider performance implications and best practices, especially when adding features that may affect page load times or user experience. + +Absolutely! Let's continue to expand the `main.js` file with more custom JavaScript functionalities, focusing on interactive and dynamic features that can enhance the user experience on your Jekyll site. + +### Further Expanded `assets/js/main.js` 2 + +```javascript +document.addEventListener('DOMContentLoaded', function() { + // Previous JavaScript code + // ... + + // Toggle Button for Dark Mode + const darkModeToggle = document.querySelector('#dark-mode-toggle'); + if (darkModeToggle) { + darkModeToggle.addEventListener('click', function() { + document.body.classList.toggle('dark-mode'); + // Save preference in local storage or handle theme switching logic + }); + } + + // Responsive Navigation Menu Toggle for Mobile View + const menuToggle = document.querySelector('.menu-toggle'); + const mainNav = document.querySelector('.main-navigation'); + if (menuToggle && mainNav) { + menuToggle.addEventListener('click', function() { + mainNav.classList.toggle('active'); + }); + } + + // Countdown Timer for Events + const countdownTimer = document.getElementById('countdown-timer'); + if (countdownTimer) { + const targetDate = new Date(countdownTimer.getAttribute('data-target-date')).getTime(); + const updateCountdown = setInterval(function() { + const now = new Date().getTime(); + const distance = targetDate - now; + + const days = Math.floor(distance / (1000 * 60 * 60 * 24)); + const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((distance % (1000 * 60)) / 1000); + + countdownTimer.innerHTML = days + "d " + hours + "h " + minutes + "m " + seconds + "s "; + + if (distance < 0) { + clearInterval(updateCountdown); + countdownTimer.innerHTML = "Event Started"; + } + }, 1000); + } + + // Dynamic Content Loading on Scroll + window.addEventListener('scroll', function() { + const loadOnScrollElement = document.getElementById('load-on-scroll'); + if (loadOnScrollElement && window.scrollY + window.innerHeight >= loadOnScrollElement.offsetTop) { + // Load content dynamically or display additional content + console.log('Load dynamic content here'); + } + }); + + // Tooltips Initialization (If Bootstrap is not used) + // If you are not using Bootstrap, you can initialize tooltips manually + const tooltips = document.querySelectorAll('.tooltip'); + tooltips.forEach(tooltip => { + tooltip.addEventListener('mouseover', function() { + // Show tooltip logic + }); + tooltip.addEventListener('mouseout', function() { + // Hide tooltip logic + }); + }); + + // More custom JavaScript code + // ... +}); +``` + +In this further expanded `main.js` file: + +- **Dark Mode Toggle**: A simple toggle button to switch between light and dark mode themes. +- **Responsive Menu Toggle**: Logic for a responsive navigation menu, particularly useful for mobile-friendly designs. +- **Countdown Timer**: A countdown timer for events or deadlines, dynamically updating. +- **Dynamic Content Loading on Scroll**: Load additional content or perform actions when the user scrolls to a certain part of the page. +- **Manual Tooltip Initialization**: If not using Bootstrap, tooltips can be manually initialized and controlled. + +### Notes24 + +- Tailor these functionalities to fit the specific design, layout, and interactivity of your Jekyll site. +- Always test the features thoroughly to ensure they work correctly and are responsive across different devices and browsers. +- Keep in mind accessibility and performance best practices when adding custom JavaScript functionalities. + +Based on the previous descriptions and files, let's create an `index.html` page for a Jekyll site. This page will act as the homepage and will include references to the layouts, includes, and assets we discussed. Note that this is a Jekyll-style HTML file with Liquid templating language, which gets processed into pure HTML when the site is built. + +### `index.html` + +```html +--- +layout: default +title: Home +--- + + +{% include header.html %} + + +
+
+

Welcome to Our Awesome Site

+

This is a brief introduction or tagline for the site.

+
+ +
+

Features

+
+ +
+
+ +
+

Recent Blog Posts

+
    + {% for post in site.posts limit:3 %} +
  • + {{ post.title }} +

    {{ post.excerpt }}

    +
  • + {% endfor %} +
+ View all posts +
+
+ + + + + +{% include footer.html %} + + + +``` + +In this `index.html` file: + +- The `layout: default` at the top uses the `default.html` layout from `_layouts`. +- The `{% include header.html %}` includes the header section. +- The main content of the homepage is wrapped in a `
`. +- The `recent-posts` section lists the latest blog posts using Jekyll's loop over `site.posts`. +- The sidebar is included with `{% include sidebar.html %}`. +- The `{% include footer.html %}` includes the footer section. +- Finally, the custom JavaScript file (`main.js`) is included before the closing `` tag. + +### Notes25 + +- The content in each section should be customized to match your site's needs. +- The structure and classes used should align with your CSS styles, especially if you're using a framework like Bootstrap. +- This file assumes that your `_config.yml` is set up correctly and that you have the necessary pages, posts, and include files. + +For a Jekyll site, especially one using Bootstrap (via CDN), a `Gemfile` is used to specify Ruby gem dependencies. The `Gemfile` typically includes Jekyll itself and any Jekyll plugins you are using. Here's an example `Gemfile` that would be suitable for the kind of site we've been discussing: + +### `Gemfile` + +```ruby +source 'https://rubygems.org' + +# Jekyll +gem 'jekyll', '~> 4.2.0' # or the latest stable version + +# If you're using GitHub Pages, you might include: +# gem 'github-pages', group: :jekyll_plugins + +# Jekyll Plugins +# Add other Jekyll plugins here as needed. Examples: +gem 'jekyll-feed', '~> 0.15' # for RSS feed generation +gem 'jekyll-sitemap', '~> 1.4' # for creating a sitemap +gem 'jekyll-seo-tag', '~> 2.7' # for SEO enhancements + +# For development and testing +group :jekyll_plugins do + gem 'jekyll-admin', '~> 0.11.0' # for an admin dashboard +end +``` + +### Explanation + +- **Jekyll Gem**: This is the core Jekyll gem. Make sure you use a version compatible with your environment. The version can be specified to ensure stability. +- **GitHub Pages**: If your site will be hosted with GitHub Pages, you might use the `github-pages` gem, which includes a set of approved plugins and dependencies. Note that this gem can enforce certain version restrictions. +- **Jekyll Plugins**: Add gems for any Jekyll plugins you plan to use. Examples include `jekyll-feed` for RSS feeds, `jekyll-sitemap` for generating a sitemap, and `jekyll-seo-tag` for SEO. +- **Development Group**: The `group :jekyll_plugins` block specifies gems that are only needed for development, like `jekyll-admin`, which provides a GUI to manage your site. + +### Usage + +1. Create a file named `Gemfile` in the root of your Jekyll site. +2. Add the above content to your `Gemfile`. +3. Run `bundle install` to install the dependencies. + +### Notes26 + +- If you are using GitHub Pages, it's important to ensure that all plugins and gems are supported by GitHub Pages. GitHub has a specific set of allowed plugins for security and stability reasons. +- Regularly updating your gems is a good practice. You can do this with `bundle update`. +- The Gemfile is a key component for managing Ruby dependencies in Jekyll and ensures that your local development environment matches the production environment as closely as possible. diff --git a/docs/includes.md b/docs/includes.md new file mode 100644 index 0000000..28924f8 --- /dev/null +++ b/docs/includes.md @@ -0,0 +1,220 @@ +analytics.html: Contains the site's web analytics code (like Google Analytics), which can be included in the layout templates to appear on every page. + +{% if site.google_analytics %} + + +{% endif %} + +comments.html: For integrating a comments section (like Disqus) into your blog posts. + +{% if page.comments %} +
+ + +{% endif %} + +footer.html: The site's footer content. This can include copyright notices, links to privacy policy or terms of service, and social media links. + +
+
+

© {{ site.time | date: '%Y' }} {{ site.title }}. All rights reserved.

+ {% if site.footer_links %} + + {% endif %} + {% include social-links.html %} +
+
+ +header.html: Contains the site's header section. This typically includes the navigation bar and may also contain site branding or identity. + + + +navigation.html: Defines the navigation menu of the site. It's often included in header.html or directly in default.html. + + + +seo.html: If you're using additional SEO tags and scripts, they might be included in this file for easy inclusion in your layouts. + + + + + + + + + + + + +sidebar.html: For sites with a sidebar, this file contains its contents, which might include a search box, list of recent posts, or advertisements. + + + +social-links.html: A snippet for social media links, which can be included in the footer or header. + + diff --git a/docs/layouts.md b/docs/layouts.md new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..4acb212 --- /dev/null +++ b/index.html @@ -0,0 +1,46 @@ +--- +layout: default +title: Home +--- + + +{% include header.html %} + + +
+
+

Welcome to Our Awesome Site

+

This is a brief introduction or tagline for the site.

+
+ +
+

Features

+
+ +
+
+ +
+

Recent Blog Posts

+
    + {% for post in site.posts limit:3 %} +
  • + {{ post.title }} +

    {{ post.excerpt }}

    +
  • + {% endfor %} +
+ View all posts +
+
+ + + + + +{% include footer.html %} + + + diff --git a/pages/about.md b/pages/about.md new file mode 100644 index 0000000..52e157b --- /dev/null +++ b/pages/about.md @@ -0,0 +1,21 @@ +--- +layout: page +title: About +permalink: /about/ +--- + +# About Us + +Welcome to [Your Site Name]! Here's a little about us. + +## Our Mission + +[Describe the mission and values of your site or organization.] + +## Our Team + +[Provide information about the team members or key people behind the site.] + +## Our Story + +[Share a brief history or background of your site, company, or project.] \ No newline at end of file diff --git a/pages/contact.md b/pages/contact.md new file mode 100644 index 0000000..e07dda0 --- /dev/null +++ b/pages/contact.md @@ -0,0 +1,22 @@ +--- +layout: page +title: Contact +permalink: /contact/ +--- + +# Contact Us + +If you have any questions, feedback, or inquiries, feel free to reach out to us. + +## Get in Touch + +- Email: [your-email@domain.com](mailto:your-email@domain.com) +- Phone: [Your Phone Number] + +## Follow Us + +[Links to social media profiles.] + +## Contact Form + +[If applicable, include a contact form here. This might require additional HTML or integration with a service.] \ No newline at end of file diff --git a/pages/faq.md b/pages/faq.md new file mode 100644 index 0000000..97f148f --- /dev/null +++ b/pages/faq.md @@ -0,0 +1,19 @@ +--- +layout: page +title: FAQ +permalink: /faq/ +--- + +# Frequently Asked Questions + +Here are some common questions we get and their answers. + +## Question 1 + +[Answer to Question 1] + +## Question 2 + +[Answer to Question 2] + +[Continue with more questions and answers as needed.] \ No newline at end of file diff --git a/pages/portfolio.md b/pages/portfolio.md new file mode 100644 index 0000000..4e5b23c --- /dev/null +++ b/pages/portfolio.md @@ -0,0 +1,19 @@ +--- +layout: page +title: Portfolio +permalink: /portfolio/ +--- + +# Our Portfolio + +Take a look at some of our past projects and accomplishments. + +## Project 1 + +[Description and images or links related to Project 1] + +## Project 2 + +[Description and images or links related to Project 2] + +[Continue with more projects as needed.] \ No newline at end of file diff --git a/pages/privacy-policy.md b/pages/privacy-policy.md new file mode 100644 index 0000000..dbd3600 --- /dev/null +++ b/pages/privacy-policy.md @@ -0,0 +1,19 @@ +--- +layout: page +title: Privacy Policy +permalink: /privacy-policy/ +--- + +# Privacy Policy + +[Your Company Name] is committed to protecting your privacy. This policy outlines our practices. + +## Information Collection and Use + +[Details about the information collection and usage.] + +## Data Security + +[Information on how data is protected.] + +[Continue with all relevant sections for a privacy policy.] \ No newline at end of file diff --git a/pages/services.md b/pages/services.md new file mode 100644 index 0000000..a3498c8 --- /dev/null +++ b/pages/services.md @@ -0,0 +1,21 @@ +--- +layout: page +title: Services +permalink: /services/ +--- + +# Our Services + +We offer a variety of services to cater to your needs. + +## Service 1 + +[Description of Service 1] + +## Service 2 + +[Description of Service 2] + +## Why Choose Our Services + +[Information about what makes your services unique or desirable.] \ No newline at end of file diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100644 index 0000000..035a308 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +# Define variables +REPO_NAME="MyWebsite" +JEKYLL_THEME="minima" # or your preferred theme +GITHUB_USERNAME="thomasthaddeus" + +# Step 1: Create a New Jekyll Site +jekyll new $REPO_NAME --theme $JEKYLL_THEME +cd $REPO_NAME + +# Step 2: Initialize Git and Commit +git init +git add . +git commit -m "Initial Jekyll site with theme $JEKYLL_THEME" + +# Step 3: Create GitHub Repository +gh repo create $REPO_NAME --public --source=. --remote=origin + +# Step 4: Push to GitHub +git push -u origin main + +# Step 5: Setup GitHub Actions for Jekyll +mkdir -p .github/workflows +echo "name: Jekyll site CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build and test Jekyll site + uses: jekyll/actions-jekyll@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }}" > .github/workflows/jekyll.yml + +git add .github/workflows/jekyll.yml +git commit -m "Setup GitHub Actions for Jekyll" +git push + +echo "Repository setup completed!" + +# Step 6: Dependency Management with Bundler +bundle init +echo "gem 'jekyll', '$(jekyll -v | cut -d' ' -f2)'" >> Gemfile +bundle install +git add Gemfile Gemfile.lock +git commit -m "Add Gemfile for Jekyll dependencies" +git push + +# Step 7: Basic Content and Layout Setup +# (This step is usually manual and theme dependent. Script can create placeholder directories.) +mkdir -p _layouts _includes _sass +touch _layouts/default.html +touch _includes/header.html +touch _includes/footer.html +touch _sass/main.scss +git add _layouts _includes _sass +git commit -m "Add basic structure for layouts, includes, and sass" +git push + +# Step 8: Initial README Documentation +echo "# $REPO_NAME + +This is a Jekyll site hosted on GitHub Pages. + +## Setup + +* To run locally, use 'bundle exec jekyll serve' +* Push to the main branch to deploy to GitHub Pages via GitHub Actions. + +## Structure + +* _posts: Blog posts in Markdown format. +* _layouts: HTML layouts for site pages. +* _includes: Reusable HTML components. +* _sass: Sass files for styling. +* assets: Static files like CSS, JS, and images." > README.md + +git add README.md +git commit -m "Add initial README documentation" +git push + +echo "Repository setup completed!"