Add VuePress site

This commit is contained in:
Mykola Grymalyuk
2021-03-11 11:55:16 -07:00
parent 13d1110b7a
commit 0ad2fb53d2
20 changed files with 13233 additions and 6 deletions

33
.github/workflows/build_test_deploy.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Build/Test/Deploy
on:
push:
branches-ignore:
- gh-pages
workflow_dispatch:
pull_request:
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
submodules: 'recursive'
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: /docs/.vuepress/dist/
CLEAN: true

5
.gitignore vendored
View File

@@ -7,3 +7,8 @@
__pycache__/
*.py[cod]
*$py.class
/docs/.vuepress/dist
/docs/.vuepress/.config.js.swp
/docs/yarn.lock
/docs/yarn-error.log
/docs/node_modules/

14
docs/.markdownlint.json Normal file
View File

@@ -0,0 +1,14 @@
{
"default": true,
"line_length": false,
"no-alt-text": false,
"no-inline-html": false,
"header-increment": false,
"no-duplicate-header": false,
"fenced-code-language": false,
"no-emphasis-as-heading": false,
"single-title": false,
"ul-style": {
"style": "asterisk"
}
}

10
docs/.markdownlintignore Normal file
View File

@@ -0,0 +1,10 @@
/node_modules/
/_book/
*.json
/extra-files/
/.git/
/icons/
/images/
/styles/
/.github/
/.vuepress/

115
docs/.vuepress/config.js Executable file
View File

@@ -0,0 +1,115 @@
const {
description
} = require('../package')
module.exports = {
title: 'OpenCore Legacy Patcher',
head: [
['meta', {
name: 'theme-color',
content: '#3eaf7c'
}],
['meta', {
name: 'apple-mobile-web-app-capable',
content: 'yes'
}],
['meta', {
name: 'apple-mobile-web-app-status-bar-style',
content: 'black'
}],
["link", {
rel: "'stylesheet",
href: "/styles/website.css"
},]
],
base: '/OpenCore-Legacy-Patcher/',
watch: {
$page(newPage, oldPage) {
if (newPage.key !== oldPage.key) {
requestAnimationFrame(() => {
if (this.$route.hash) {
const element = document.getElementById(this.$route.hash.slice(1));
if (element && element.scrollIntoView) {
element.scrollIntoView();
}
}
});
}
}
},
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-multimd-table'), {
rowspan: true,
});
}
},
theme: 'vuepress-theme-succinct',
globalUIComponents: [
'ThemeManager'
],
themeConfig: {
lastUpdated: true,
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher',
editLinks: true,
editLinkText: 'Help us improve this page!',
logo: 'homepage.png',
sidebar: [{
title: 'Introduction',
collapsable: false,
sidebarDepth: 1,
children: [
'START',
'MODELS',
]
},
{
title: 'Setting up',
collapsable: false,
sidebarDepth: 1,
children: [
'INSTALLER',
'BUILD',
]
},
{
title: 'Installation',
collapsable: false,
sidebarDepth: 1,
children: [
'BOOT',
'POST-INSTALL',
]
},
{
title: 'Misc',
collapsable: false,
sidebarDepth: 1,
children: [
'TROUBLESHOOTING',
]
},
],
},
plugins: [
'@vuepress/plugin-back-to-top',
'vuepress-plugin-smooth-scroll',
['vuepress-plugin-medium-zoom',
{
selector: "img",
options: {
background: 'var(--bodyBgColor)'
}
}],
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

View File

@@ -0,0 +1,49 @@
/**
* Custom Styles here.
*
* refhttps://v1.vuepress.vuejs.org/config/#index-styl
*/
[data-theme='light']
--sideBgColor $sideBgColor
[data-theme='dark']
--sideBgColor $sideBgColorDark
--dropShadowColor $dropShadowColor
.home .hero img
max-width 450px!important
.navbar
filter drop-shadow(0px 1px 1px var(--dropShadowColor))
.sidebar
background-color var(--sideBgColor)
div[class*="language-"]
pre, pre[class*="language-"]
margin-top 0
html {
overflow-y: scroll;
overflow-x: hidden;
background-color: unset;
}
::-webkit-scrollbar {
width 0px
background transparent /* make scrollbar transparent */
}
tr
&:nth-child(1n)
background-color var(--bodyBgColor)
&:nth-child(2n)
background-color var(--sideBgColor)
.dropdown-wrapper .nav-dropdown
border 1px solid var(--sideBgColor)!important
background-color var(--sideBgColor)!important
box-shadow 0px 0px 2px var(--bodyBgColor)
right -12%!important

View File

@@ -0,0 +1,23 @@
/**
* Custom palette here.
*
* refhttps://v1.vuepress.vuejs.org/zh/config/#palette-styl
*/
$bodyFontSize = 16px
$fallbackTheme = 'dark'
$dropShadowColor = #111112
// Light Theme
$accentColor = #19b3e7
$textColor = #2c3e50
$bodyBgColor = #fff
$sideBgColor = #fff
$badgeTipColor = #caf2ff
// Dark Theme
$accentColorDark = #30BCD5
$textColorDark = #ccc
$bodyBgColorDark = #2d3033
$sideBgColorDark = #363b40
$badgeTipColorDark = #023e52

20
docs/BOOT.md Normal file
View File

@@ -0,0 +1,20 @@
# Booting OpenCore and macOS
Now we finally get to boot OpenCore!
Reboot machine while holding `Option` to select the EFI Boot entry with the OpenCore icon:
* This will be the Mac Boot Picker
![](../images/efi-boot.png)
Now that you've loaded OpenCore, now select Install macOS!:
* This will be the OpenCore Picker
![](../images/oc-boot.png)
After plenty of verbose booting, you will reach the installer screen! From there it's just like any normal macOS install.
# Once installed and booting, head to [Post-Installation](./POST-INSTALL.md)

37
docs/BUILD.md Normal file
View File

@@ -0,0 +1,37 @@
# Building and installing OpenCore
Now that we have a macOS installer, lets now build our OpenCore configuration!
First Download the latest release:
* [OpenCore Legacy Patcher Releases](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
Next, run the `OpenCore-Patcher.app`:
![](../images/first-run.png)
From here you have a couple important options:
* Build OpenCore
* Install OpenCore to USB/internal drive
* Change Model
* Patcher Settings
If you're patching for a different machine than you're running, please select "Change Model" and enter the updated SMBIOS. For more advanced users, you may also tweak the patcher's build settings via "Patcher Settings"
Now lets enter "Build OpenCore":
![](../images/build-efi.png)
The process should be quite quick to build, once finished you'll be plopped back to the main menu.
Next lets run `Install OpenCore to USB/internal drive`:
| Select Drive | Select EFI/FAT32 Partition |
| :--- | :--- |
| ![](../images/disk-start.png) | ![](../images/disk-efi.png) |
* If you have issues, please ensure you install OpenCore onto a FAT32 partition to ensure your Mac is able to boot it. You will need to format your drive as GUID/GPT in Disk Utility
# Once finished, head to [Booting OpenCore and macOS](./BOOT.md)

View File

@@ -1,9 +1,9 @@
# How to download and build macOS Installers
# Download and build macOS Installers
* [Downloading](#downloading)
* [Building](#building)
This doc is centered around downloading and writting the macOS installer to a USB. If you're already familair with how to do this, you can skip.
This doc is centered around downloading and writing the macOS installer to a USB. If you're already familiar with how to do this, you can skip.
* Note: 16GB+ USB will be required for the installer
@@ -28,7 +28,7 @@ Once finished, you'll find in your `~/macOS-Installer/` folder a DMG containing
* Note: We recommend to move the Install macOS.app into the `/Applications` folder, as we'll be executing commands from there.
* Note 2: Running Cmd+Shift+G in Finder will allow you to easily jump to `~/macOS-installer`
![](../images/munki-done.png)
![](../images/munki-done-2.png)
![](../images/munki-dmg.png)
@@ -50,4 +50,4 @@ sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstall
![](../images/createinstallmedia.png)
# Once finished, [return to the README to finish up](../README.md)
# Once finished, head to [Building and installing OpenCore](./BUILD.md)

View File

@@ -122,4 +122,6 @@ The below table will list all supported and unsupported functions of the patcher
| :--- | :--- | :--- | :--- |
| Xserve1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
| Xserve2,1 | Early 2008 | ^^ | ^^ |
| Xserve3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
| Xserve3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)

20
docs/README.md Normal file
View File

@@ -0,0 +1,20 @@
---
home: true
heroImage: /homepage.png
heroText: OpenCore Legacy Patcher
actionText: Getting Started→
actionLink: START.md
meta:
- name: description
content: Experience macOS just like before
features:
- title: Built with security in mind
details: Supporting System Integrity Protection(SIP), FileVault 2, .im4m Secure Boot and Vaulting. You're just as secure as a supported Mac
- title: Native OTA updates
details: Install updates the moment the come out just like on a supported Mac, and no more 12GB+ updates.
- title: Zero firmware patching
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
footer: Copyright © Dortania 2020-2021
---

19
docs/START.md Normal file
View File

@@ -0,0 +1,19 @@
# What is OpenCore?
This is a sophisticated boot loader used to inject and patch data in memory, instead of on disk. This means we're able to get near-native experience on many unsupported Macs with Metal GPUs. This includes many of the long desired features of other patchers such as:
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
* Native OTA OS DELTA updates on all Macs
* Recovery OS, Safe Mode and Single-user Mode booting
While many PC users from the Hackintosh community are familiar with OpenCore, OpenCore was designed as Mac and PC agnostic ensuring both platforms can use it easily. And with OpenCore Legacy Patcher, we help automate the process making running with OpenCore that much easier.
## How do I get started?
1. The first step of ensuring whether your model is support is checking here:
* [Supported Models](./MODELS.md)
2. [Download and build macOS Installer](./INSTALLER.md)
3. [Run the `OpenCore-Patcher.app`](./BUILD.md)
4. [Reboot and boot OpenCore](./BOOT.md)

View File

@@ -1 +0,0 @@
theme: jekyll-theme-minimal

12795
docs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

51
docs/package.json Normal file
View File

@@ -0,0 +1,51 @@
{
"name": "OpenCore-Legacy-Patcher",
"version": "0.0.1",
"description": "Guide to put macOS on unsupported devices",
"main": "",
"author": {
"name": "Dortania",
"url": "https://github.com/dortania"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dortania/OpenCore-Legacy-Patcher.git"
},
"scripts": {
"dev": "vuepress dev",
"build": "vuepress build",
"fix-lint": "run-script-os",
"fix-lint:default": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
"fix-lint:win32": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
"lint": "run-script-os",
"lint:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
"lint:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
"lint-ci": "run-script-os",
"lint-ci:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
"lint-ci:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
"sort-dict": "node ./scripts/sortDict.js",
"spellcheck": "run-script-os",
"spellcheck:default": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files '**/*.md' && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
"spellcheck:win32": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files **/*.md && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
"test": "run-script-os",
"test:default": "npm run lint --silent; npm run spellcheck --silent",
"test:win32": "npm run lint --silent & npm run spellcheck --silent"
},
"license": "CC-BY-NC-SA-4.0",
"devDependencies": {
"@vuepress/plugin-back-to-top": "^1.7.1",
"markdown-it-multimd-table": "^4.0.3",
"markdown-link-check": "^3.8.5",
"markdownlint-cli": "^0.26.0",
"run-script-os": "^1.1.4",
"spellchecker-cli": "^4.4.0",
"vuepress": "^1.7.1",
"vuepress-plugin-medium-zoom": "^1.1.9",
"vuepress-plugin-zooming": "^1.1.8",
"vuepress-theme-book": "0.0.5",
"vuepress-theme-dark-new": "^0.1.2",
"vuepress-theme-succinct": "^1.6.4",
"vuepress-theme-yuu": "^2.3.0"
},
"homepage": "https://dortania.github.io/OpenCore-Legacy-Patcher/"
}

View File

@@ -0,0 +1,9 @@
from pathlib import Path
import subprocess
for i in [i for i in list(Path().resolve().glob("**/*.md")) if "node_modules" not in str(i.parent) and "_book" not in str(i.parent)]:
#bert = subprocess.run(['npx', 'markdown-link-check', '"' + str(i) + '"', '-c', '.markdownlinkcheck.json'], capture_output=True, shell=True, cwd=Path().resolve())
bert = subprocess.run('npx markdown-link-check "' + str(i) + '"', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd=Path().resolve())
outpot = bert.stdout.decode().replace("\r", "").split("\n")
outpot = [i for i in outpot if ("FILE: " in i or " → Status: " in i) and " → Status: 429" not in i]
[print(i) for i in outpot]

26
docs/scripts/sortDict.js Normal file
View File

@@ -0,0 +1,26 @@
const fs = require("fs");
process.chdir(__dirname);
console.log("Reading dictionary.txt");
let dictionary = fs.readFileSync("../dictionary/dictionary.txt", { encoding: "UTF8" })
.replace("\r", "").split("\n");
let ocDictionary = fs.readFileSync("../dictionary/opencorekeys.txt", { encoding: "UTF8" })
.replace("\r", "").split("\n");
dictionary = dictionary.filter(string => string != "");
ocDictionary = ocDictionary.filter(string => string != "");
dictionary = dictionary.filter((string, index) => dictionary.indexOf(string) == index);
ocDictionary = ocDictionary.filter((string, index) => ocDictionary.indexOf(string) == index);
dictionary = dictionary.filter(string => !ocDictionary.includes(string));
console.log("Sorting...");
dictionary.sort();
ocDictionary.sort();
console.log("Writing dictionary.txt");
fs.writeFileSync("../dictionary/dictionary.txt", dictionary.join("\n"));
fs.writeFileSync("../dictionary/opencorekeys.txt", ocDictionary.join("\n"));