Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
w3labkr committed May 21, 2022
1 parent 76699e0 commit ab77387
Show file tree
Hide file tree
Showing 262 changed files with 17,940 additions and 1 deletion.
95 changes: 95 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# jekyll
.jekyll-metadata
_site
.sass-cache
.jekyll-cache


# bundler
*.gem
Gemfile.lock


# python
*.whl


# npm
node_modules
package-lock.json


# _sass
_sass/@primer/css/**/*.md


# lighthouse
*.report.html


# action
action.changelog.md


# Created by https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,visualstudiocode

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### 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

# Support for Project snippet scope
.vscode/*.code-snippets

# Ignore code-workspaces
*.code-workspace

# End of https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
_site

assets/**/*.min.*
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.2
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
w3labkr.github.io
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing Guide

[Jekyll](https://jekyllrb.com/){:target="_blank"} is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website.

## Quickstart

Install the jekyll and bundler gems:

```shell
gem install bundler jekyll
```

To install gems in your Gemfile using Bundler, run the following in the directory that has the Gemfile:

```shell
bundle install
bundle exec jekyll serve
```

Pass the --livereload option to serve to automatically refresh the page with each change you make to the source files:

```shell
bundle exec jekyll serve --livereload
```

## Troubleshooting

You have already activated i18n 1.10.0, but your Gemfile requires i18n 0.9.5. Prepending `bundle exec` to your command may solve this.

```shell
$ ruby -S gem list --local | grep i18n
i18n (1.10.0, 0.9.5)

$ bundle exec jekyll serve
```

If you are using Ruby version 3.0.0 or higher, step 5 may fail. You may fix it by adding webrick to your dependencies:

```shell
bundle add webrick
bundle exec jekyll serve
```

[You have already activated i18n 1.8.11, but your Gemfile requires i18n 0.9.5. Prepending bundle exec to your command may solve this. (Gem::LoadError)](https://github.com/Homebrew/brew.sh/issues/845){:target="_blank"}

7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org" # source "https://gems.ruby-china.com"

gemspec

gem "github-pages", group: :jekyll_plugins

gem "webrick", "~> 1.7"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 RunDocs & contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
DEBUG=JEKYLL_GITHUB_TOKEN=blank PAGES_API_URL=http://0.0.0.0
ALIAS=jekyll-rtd-theme

help:
@echo "HomePage: https://github.com/rundocs/${ALIAS}\n"
@echo "Usage:"
@echo " make [subcommand]\n"
@echo "Subcommands:"
@echo " install Install the theme dependencies"
@echo " format Format all files"
@echo " report Make a report from Google lighthouse"
@echo " clean Clean the workspace"
@echo " dist Build the theme css and script"
@echo " status Display status before push"
@echo " theme Make theme as gem and install"
@echo " build Build the test site"
@echo " server Make a livereload jekyll server to development"
@echo " checkout Reset the theme minified css and script to last commit"

checkout:
@git checkout _config.yml
@git checkout assets/js/theme.min.js
@git checkout assets/css/theme.min.css

install:
@gem install jekyll bundler
@npm install
@bundle install

format:
@npm run format

report:
@npm run report

clean:
@bundle exec jekyll clean

dist: format clean
@npm run build

status: format clean checkout
@git status

theme: dist
@gem uninstall ${ALIAS}
@gem build *.gemspec
@gem install *.gem && rm -f *.gem

build: dist
@${DEBUG} bundle exec jekyll build --safe --profile

server: dist
@${DEBUG} bundle exec jekyll server --safe --livereload
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# guidelines
# W3LabKr Guidelines

Guidelines for W3LabKr open-source projects.

## Contents

{% include list.liquid all=true %}
35 changes: 35 additions & 0 deletions _SAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SAMPLE

## Installation

```shell
```

## Configuration

```shell
```

## Dependencies

### [dependency](dependency){:target="_blank"}

```shell
```

```json
```

## Integration with visual studio code

Install through vscode extensions. Search for [Stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint){:target="_blank"}.

**settings.json**

```json
```

## Troubleshooting

```shell
```
34 changes: 34 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
title: W3LabKr
description: W3LabKr Guidelines

theme: null

google:
gtag: 'UA-178473923-2'

# debug:
# compress: true
# dist: false
# shortcodes: true

readme_index:
with_frontmatter: true

plugins:
- jemoji
- jekyll-avatar
- jekyll-mentions

exclude:
- Makefile
- CNAME
- LICENSE
- update.sh
- Gemfile
- Gemfile.lock
- requirements.txt
- node_modules
- package.json
- package-lock.json
- webpack.config.js
- jekyll-rtd-theme.gemspec
9 changes: 9 additions & 0 deletions _includes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Document Statement

## templates

Template files for this theme

## common

Some common variables and code snippets are designed to be shared by multiple themes
3 changes: 3 additions & 0 deletions _includes/common/assets/data.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%- include common/rest/site_pages.liquid -%}

{{- site_pages | jsonify -}}
4 changes: 4 additions & 0 deletions _includes/common/assets/robots.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: {{ "sitemap.xml" | absolute_url }}
12 changes: 12 additions & 0 deletions _includes/common/assets/sitemap.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{%- include common/rest/site_pages.liquid -%}

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in site_pages -%}
<url>
<loc>{{ page.url | absolute_url | xml_escape }}</loc>
<priority>{{ page.content | size | divided_by: 2048.0 | times: 10 | ceil | divided_by: 10.0 | at_least: 0.1 | at_most: 1.0 }}</priority>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
</url>
{%- endfor %}
</urlset>
39 changes: 39 additions & 0 deletions _includes/common/assets/sw.caches.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
self.addEventListener("activate", function (event) {
const current = ["{{ theme_alias }}"];

event.waitUntil(
caches.keys().then(function (keyList) {
return Promise.all(
keyList.map(function (key) {
if (current.indexOf(key) === -1) {
return caches.delete(key);
}
})
);
})
);
});

self.addEventListener("fetch", function (e) {
if (e.request.url.match("{{ theme_alias }}")) {
e.respondWith(
caches.match(e.request).then(function (resp) {
if (resp !== undefined) {
return resp;
} else {
return fetch(e.request, {
cache: "no-store",
})
.then(function (resp) {
let clone = resp.clone();
caches.open("{{ theme_alias }}").then(function (cache) {
cache.put(e.request, clone);
});
return resp;
})
.catch(console.log);
}
})
);
}
});
Loading

0 comments on commit ab77387

Please sign in to comment.