Skip to content

Commit

Permalink
docs: add project web page (#105)
Browse files Browse the repository at this point in the history
Add source code for the project web page.
  • Loading branch information
plusvic authored May 14, 2024
1 parent 794faf9 commit 3f617d7
Show file tree
Hide file tree
Showing 76 changed files with 14,203 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Deploy site to GitHub Pages
name: GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- main
- test_site

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'site'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: |
cd site
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
- name: Build production website
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
cd site
npm run build \
-- \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./site/public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
*.profraw
target
macros/target
site/node_modules
site/public
site/resources
14 changes: 14 additions & 0 deletions py/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ impl Compiler {
/// initial value when the [`Rules`] are used for scanning data, however
/// each scanner can change the variable's value by calling
/// [`crate::Scanner::set_global`].
///
/// The type of `value` must be: bool, str, bytes, int or float.
///
/// # Raises
///
/// [TypeError](https://docs.python.org/3/library/exceptions.html#TypeError)
/// if the type of `value` is not one of the supported ones.
fn define_global(
&mut self,
ident: &str,
Expand Down Expand Up @@ -205,6 +212,13 @@ impl Scanner {
///
/// The variable will retain the new value in subsequent scans, unless this
/// function is called again for setting a new value.
///
/// The type of `value` must be: `bool`, `str`, `bytes`, `int` or `float`.
///
/// # Raises
///
/// [TypeError](https://docs.python.org/3/library/exceptions.html#TypeError)
/// if the type of `value` is not one of the supported ones.
fn set_global(
&mut self,
ident: &str,
Expand Down
11 changes: 11 additions & 0 deletions site/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions site/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
31 changes: 31 additions & 0 deletions site/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-console": 0,
"quotes": ["error", "single"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
]
}
}
16 changes: 16 additions & 0 deletions site/.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"config": {
"default": true,
"MD013": false,
"MD022": false,
"MD024": false,
"MD025": false,
"MD026": false,
"MD033": false,
"MD034": false,
"MD036": false
},
"ignores": [
"node_modules"
]
}
8 changes: 8 additions & 0 deletions site/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.eslintcache
.stylelintcache
.netlify
.hugo_build.lock
yarn-error.log
node_modules
public
resources
4 changes: 4 additions & 0 deletions site/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enable-pre-post-scripts = true
auto-install-peers = true
node-linker = hoisted
prefer-symlinked-executables = false
2 changes: 2 additions & 0 deletions site/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assets/scss/common/_variables-custom.scss
node_modules
35 changes: 35 additions & 0 deletions site/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"no-empty-source": null,
"scss/comment-no-empty": null,
"scss/at-extend-no-missing-placeholder": null,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function",
"tailwind",
"apply",
"responsive",
"variants",
"screen"
]
}
]
}
}
Binary file added site/assets/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/favicon.ico
Binary file not shown.
Binary file added site/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added site/assets/images/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions site/assets/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Put your custom JS code here
1 change: 1 addition & 0 deletions site/assets/mask-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions site/assets/scss/common/_custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Put your custom SCSS code here

[data-bs-theme="dark"] body {
background: rgb(22, 22, 37);
}

[data-bs-theme="dark"] .navbar {
background: rgb(22, 22, 37);
}

.expressive-code pre {
padding: 8px;
}
14 changes: 14 additions & 0 deletions site/assets/scss/common/_variables-custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Light mode
$primary: rgb(114, 150, 239);

// Dark mode
$link-color-dark: rgb(134, 170, 249);
$button-color-dark: rgb(134, 170, 249);
$body-bg-dark: rgb(22, 22, 37);


:root,
::backdrop {
--sl-color-accent-high: rgb(134, 170, 249);
}

Empty file added site/assets/svgs/.gitkeep
Empty file.
86 changes: 86 additions & 0 deletions site/config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
title = "YARA-X"
baseurl = "/"
canonifyURLs = false
disableAliases = true
disableHugoGeneratorInject = true
# disableKinds = ["taxonomy", "term"]
enableEmoji = true
enableGitInfo = false
enableRobotsTXT = true
languageCode = "en-US"
paginate = 10
rssLimit = 10
summarylength = 20 # 70 (default)

# Multilingual
defaultContentLanguage = "en"
disableLanguages = ["de", "nl"]
defaultContentLanguageInSubdir = false

copyRight = "Copyright (c) 2020-2024 Hyas"

[build.buildStats]
enable = true

[outputs]
home = ["HTML", "RSS", "searchIndex"]
section = ["HTML", "RSS", "SITEMAP"]

[outputFormats.searchIndex]
mediaType = "application/json"
baseName = "search-index"
isPlainText = true
notAlternative = true

# Add output format for section sitemap.xml
[outputFormats.SITEMAP]
mediaType = "application/xml"
baseName = "sitemap"
isHTML = false
isPlainText = true
noUgly = true
rel = "sitemap"

[sitemap]
changefreq = "monthly"
filename = "sitemap.xml"
priority = 0.5

[caches]
[caches.getjson]
dir = ":cacheDir/:project"
maxAge = -1 # "30m"

[taxonomies]
contributor = "contributors"
category = "categories"
tag = "tags"

[permalinks]
blog = "/blog/:slug/"
docs = "/docs/:sections[1:]/:slug/"
# docs = "/docs/1.0/:sections[1:]/:slug/"

[minify.tdewolff.html]
keepWhitespace = false

[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "categories"
weight = 100
[[related.indices]]
name = "tags"
weight = 80
[[related.indices]]
name = "date"
weight = 10

[imaging]
anchor = "Center"
bgColor = "#ffffff"
hint = "photo"
quality = 85
resampleFilter = "Lanczos"
9 changes: 9 additions & 0 deletions site/config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[en]
languageName = "English"
contentDir = "content/en"
weight = 10

[en.params]
languageISO = "EN"
languageTag = "en-US"
footer = 'Brought to you by <a class="text-muted" href="https://www.virustotal.com/">VirusTotal</a>'
Loading

0 comments on commit 3f617d7

Please sign in to comment.