-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: transform the guideline into a webpage
By transforming the guidelines project into a webpage, now the contents of the documentation can be hosted through GitHub Pages as with any other source of documentation. Also, better navigation and styling can be achieved if needed, specially with image and others. tyle of the page resembles that of the generated TypeDoc, making it easy for the developers to navigate all the documentation pages now. A page about the guidelines project itself has been added, the pages for the community had been splitted, and miner styling has been done through all content pages. BREAKING CHANGE: The whole project structure has changed.
- Loading branch information
Showing
53 changed files
with
1,116 additions
and
1,797 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Use 2 spaces since npm does not respect custom indentation settings | ||
[package.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Use 2 spaces since npm does not respect custom indentation settings | ||
[**/package-definition.json] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: on-commit-publish | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
publish-docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup node version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- name: Installing project dependencies | ||
run: npm install | ||
- name: Building the site | ||
run: npm run build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './dist' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# OS generated files # | ||
.DS_Store | ||
Thumbs.db | ||
.tmp/ | ||
|
||
# IDE generated file # | ||
.idea/ | ||
|
||
# PackageManager specific lock files | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock | ||
|
||
# Node generated files | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Gnerated folder for site | ||
dist/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
const markdownIt = require('markdown-it'); | ||
const markdownItAnchor = require('markdown-it-anchor'); | ||
const eleventySass = require('eleventy-sass'); | ||
|
||
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); | ||
const eleventyNavigationPlugin = require('@11ty/eleventy-navigation'); | ||
|
||
module.exports = function (el) { | ||
/* | ||
* Copy your _assets elements directly to a subfolder or | ||
* file in the output. You may add more files if required. | ||
*/ | ||
el.addPassthroughCopy('src/css'); | ||
el.addPassthroughCopy('src/js'); | ||
el.addPassthroughCopy('src/img'); | ||
el.addPassthroughCopy('src/favicon.ico'); | ||
|
||
/* | ||
* Add plugins. | ||
* Add yours at the bottom if needed. | ||
*/ | ||
el.addPlugin(eleventySass); | ||
el.addPlugin(syntaxHighlight); | ||
el.addPlugin(eleventyNavigationPlugin); | ||
|
||
/* | ||
* Set the markdown library to use, use a custom instance to | ||
* allow the addition of markdown-it-anchor plugin | ||
*/ | ||
el.setLibrary('md', markdownIt({ html: true }).use(markdownItAnchor, { | ||
permalink: markdownItAnchor.permalink.linkAfterHeader({ | ||
class: 'anchor', | ||
assistiveText: title => `Permalink to “${title}”`, | ||
visuallyHiddenClass: 'hidden' | ||
}) | ||
})); | ||
|
||
/* | ||
* Set global data that will be used by all pages, as to avoid | ||
* having to repeat it in every front matter | ||
*/ | ||
el.addGlobalData('layout', 'doc'); | ||
el.addGlobalData('navOptions', { | ||
includeSelf: true, allowMissing: true | ||
}); | ||
el.addGlobalData('devUrl', 'https://localhost:8080'); | ||
el.addGlobalData('deployUrl', 'https://gobstones.github.io/gobstones-guidelines'); | ||
|
||
return { | ||
dir: { | ||
input: 'src', | ||
output: 'dist', | ||
includes: 'templates/includes', | ||
layouts: 'templates/layouts', | ||
}, | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.