Skip to content

Commit

Permalink
refactor: prettify entire codebase also with prose-wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Firgrep committed Aug 16, 2024
1 parent b8c80de commit 1c77fa7
Show file tree
Hide file tree
Showing 99 changed files with 15,557 additions and 12,906 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals"
}
69 changes: 51 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,41 @@

## Checklist

- [ ] Philosophical or literary contribution (docs). Leave **unchecked** for <code>code</code> contribution.
- [ ] Philosophical or literary contribution (docs). Leave **unchecked** for
<code>code</code> contribution.

- **IMPLIED CONSENT** By opening this pull request and contributing philosophical or literary content, I accept that my writing is submitted under the [ATTRIBUTION-NONCOMMERCIAL-SHAREALIKE 4.0 INTERNATIONAL](https://creativecommons.org/licenses/by-nc-sa/4.0/), which:
- **IMPLIED CONSENT** By opening this pull request and contributing
philosophical or literary content, I accept that my writing is submitted
under the
[ATTRIBUTION-NONCOMMERCIAL-SHAREALIKE 4.0 INTERNATIONAL](https://creativecommons.org/licenses/by-nc-sa/4.0/),
which:

- Prohibits commercial reuse of the content.
- Allows sharing, remixing, and building upon the material as long as attribution is given.

I understand that my writing may be modified, remixed, and built upon by others within the `systemphil/sphil` or sPhil project, in accordance with the license terms, indefinitely. See [legal code](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en).

- **REQUIRED** I have followed the [formatting guidelines](https://github.com/systemphil/sphil/blob/dev/src/pages/contributing/formatting/basic-markdown.md) and verified there are no formatting bugs. [Try markdown preview here](https://markdownlivepreview.com/).
- **REQUIRED** I have followed the [Chicago author-date style](https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-2.html).
- **REQUIRED** I have added or verified metadata title, description, and contributors at the _very top_ of the file followed by a `##` title heading. Additionally, I have ensured `isArticle` is set to `true`. Example:
- Allows sharing, remixing, and building upon the material as long as
attribution is given.

I understand that my writing may be modified, remixed, and built upon by
others within the `systemphil/sphil` or sPhil project, in accordance
with the license terms, indefinitely. See
[legal code](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en).

- **REQUIRED** I have followed the
[formatting guidelines](https://github.com/systemphil/sphil/blob/dev/src/pages/contributing/formatting/basic-markdown.md)
and verified there are no formatting bugs.
[Try markdown preview here](https://markdownlivepreview.com/).
- **REQUIRED** I have followed the
[Chicago author-date style](https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-2.html).
- **REQUIRED** I have added or verified metadata title, description, and
contributors at the _very top_ of the file followed by a `##` title
heading. Additionally, I have ensured `isArticle` is set to `true`.
Example:

```md
---
title: The Immediate Difference Between Pure Being and Pure Nothing
description: Learn about the difference between being and nothing in Hegel's Science of Logic.
description:
Learn about the difference between being and nothing in Hegel's
Science of Logic.
isArticle: true
authors: Jerry Maguire (2024)
editors: Steve Stevenson (2023), Karen Hansen (2022)
Expand All @@ -37,29 +55,44 @@

<summary>Further information</summary>

I have signed the document with my name/username under either as `Authors`, `Editors` or `Contributors`.
I have signed the document with my name/username under either as
`Authors`, `Editors` or `Contributors`.

> Use **Authors** if you have created and substantially added content.
> Use **Editor** if you have made substantial edits or review.
> Use **Contributor** if you have made minor edits, reviews or contributions.
> If you've done multiple, pick the most weighted: Author > Editor > Contributor.
> If you prefer to remain anonymous, that's fine too, but note that a record of your contributions based on your GitHub username will exist here in the codebase.
> Use **Contributor** if you have made minor edits, reviews or
> contributions.
> If you've done multiple, pick the most weighted: Author > Editor >
> Contributor.
> If you prefer to remain anonymous, that's fine too, but note that a
> record of your contributions based on your GitHub username will exist
> here in the codebase.

</details>

- **REQUIRED** I have ensured that the [project's central bibliography](https://github.com/systemphil/sphil/blob/main/README_BIBLIOGRAPHY.md) contains the necessary bibliographical details for the citations I have used.
- **REQUIRED** I have ensured that the
[project's central bibliography](https://github.com/systemphil/sphil/blob/main/README_BIBLIOGRAPHY.md)
contains the necessary bibliographical details for the citations I have
used.

- _Optional_ My article is a stub or I want to actively encourage contribution, I've added the Stub component to the bottom of my content or where relevant:
- _Optional_ My article is a stub or I want to actively encourage
contribution, I've added the Stub component to the bottom of my content
or where relevant:

```ts
import Stub from "@/components/Stub";

<Stub />;
```

- **If Docs contribution is unchecked:** Code contribution ([Apache version 2 license](https://www.apache.org/licenses/LICENSE-2.0.txt))
- **If Docs contribution is unchecked:** Code contribution
([Apache version 2 license](https://www.apache.org/licenses/LICENSE-2.0.txt))
<details>

All code apart of what is inside `src/pages/**` (excluding `/contributing/**`, `_app.mdx`, `_document.tsx`, `_meta.json`, `acknowledgements.mdx`, `index.mdx`, `privacy.mdx`, `team.mdx`, `terms.mdx`) is subject to Apache version 2 license. Basically, anything outside of content, literature, philosophy.
All code apart of what is inside `src/pages/**` (excluding
`/contributing/**`, `_app.mdx`, `_document.tsx`, `_meta.json`,
`acknowledgements.mdx`, `index.mdx`, `privacy.mdx`, `team.mdx`, `terms.mdx`)
is subject to Apache version 2 license. Basically, anything outside of
content, literature, philosophy.

</details>
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"tabWidth": 4,
"semi": true,
"singleQuote": false,
"endOfLine": "lf"
"endOfLine": "lf",
"proseWrap": "always"
}

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
// Git Lens
"eamodio.gitlens"
]
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"[mdx]": {
"editor.wordWrap": "on"
}
}
}
48 changes: 36 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,60 @@
# 🚧 This is a work in progress

If you'd like to be part of the development of sPhil, kindly follow the instructions below. If you have any further questions or would like to get involved, [get in touch with Filip (Firgrep) here](mailto:[email protected]).
If you'd like to be part of the development of sPhil, kindly follow the
instructions below. If you have any further questions or would like to get
involved,
[get in touch with Filip (Firgrep) here](mailto:[email protected]).

## Setting up your local environment and branch

0.0. Once you have access to the repo on github, fork and/or clone it into a folder where you keep your projects.
0.0. Once you have access to the repo on github, fork and/or clone it into a
folder where you keep your projects.

0.1. Then `cd sphil` to get into the project directory.

0.2. Make your own development branch `git branch dev-<your-name>` (example: `git branch dev-tim`).
0.2. Make your own development branch `git branch dev-<your-name>` (example:
`git branch dev-tim`).

0.3. Set the newly made development branch as the current active branch, run `git checkout <your-branch-name>`.
0.3. Set the newly made development branch as the current active branch, run
`git checkout <your-branch-name>`.

0.4. In future, when getting the latest changes from the main development branch, run `git merge dev` whilst on your development branch to incorporate the changes into your branch.
0.4. In future, when getting the latest changes from the main development
branch, run `git merge dev` whilst on your development branch to incorporate the
changes into your branch.

### Packages Installation

1.0. Once inside, run `npm i` (alias `npm install`) to install all the packages. This will create the `/node_modules` folder.
1.0. Once inside, run `npm i` (alias `npm install`) to install all the packages.
This will create the `/node_modules` folder.

### Environmental Variables

2.0. There are no environmental variables! This is a static website. (Caveat: we defined some public variables depending on where the site is hosted.)
2.0. There are no environmental variables! This is a static website. (Caveat: we
defined some public variables depending on where the site is hosted.)

### Running the Server

9.9. Finally, to start a local development server, run `npm run dev` and open up `http://localhost:3000` on your favorite browser.
9.9. Finally, to start a local development server, run `npm run dev` and open up
`http://localhost:3000` on your favorite browser.

- Whenever you make any edits to the source files while the server is running, the server will pick up those changes and output them immediately. This is extremely handy during development, as you can input code and hit `ctrl` + `k` then `s` (save-all) and view directly your latest changes.
- To terminate the server, hit `ctrl` + `c` on your keyboard whilst in the terminal where the server runs, input `y` when prompted to terminate batch job.
- Whenever you make any edits to the source files while the server is running,
the server will pick up those changes and output them immediately. This is
extremely handy during development, as you can input code and hit `ctrl` +
`k` then `s` (save-all) and view directly your latest changes.
- To terminate the server, hit `ctrl` + `c` on your keyboard whilst in the
terminal where the server runs, input `y` when prompted to terminate batch
job.

> ❗ You may get an error (e.g. `useRef` is `null`) as your development server refreshes. This is likely due to how `nextra` processes the `mdx` files. Perform a hard refresh (hit `F5`) to resolve this.
> ❗ You may get an error (e.g. `useRef` is `null`) as your development server
> refreshes. This is likely due to how `nextra` processes the `mdx` files.
> Perform a hard refresh (hit `F5`) to resolve this.
## License

All files and content under `/src/pages`, with the exception of `/src/pages/_app.mdx`, `/src/pages/_document.tsx`, `/src/pages/acknowledgements.tsx`, `/src/pages/index.mdx`, `/src/pages/privacy.tsx`, `/src/pages/team.mdx`, `/src/pages/terms.mdx`, any files within `src/pages/contributing` folder and any `_meta.json` files, are subject to Attribution-NonCommercial-ShareAlike 4.0 International License. The rest follows Apache License Version 2.0, January 2004.
All files and content under `/src/pages`, with the exception of
`/src/pages/_app.mdx`, `/src/pages/_document.tsx`,
`/src/pages/acknowledgements.tsx`, `/src/pages/index.mdx`,
`/src/pages/privacy.tsx`, `/src/pages/team.mdx`, `/src/pages/terms.mdx`, any
files within `src/pages/contributing` folder and any `_meta.json` files, are
subject to Attribution-NonCommercial-ShareAlike 4.0 International License. The
rest follows Apache License Version 2.0, January 2004.
4 changes: 1 addition & 3 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
"Taggart",
"Wissenschaft"
],
"enableFiletypes": [
"mdx"
],
"enableFiletypes": ["mdx"],
"ignoreWords": [
"biblatex",
"datetime",
Expand Down
15 changes: 10 additions & 5 deletions docs/BIBLIOGRAPHY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Bibliography

Store bibliography details used in the workspace here and copy-paste where needed.
Store bibliography details used in the workspace here and copy-paste where
needed.

## Example

Expand All @@ -19,10 +20,14 @@ Store bibliography details used in the workspace here and copy-paste where neede

## Primary

- Hegel, Friedrich Georg Wilhelm. _The Science of Logic_. Translated by George di Giovanni, Cambridge University Press, 2010.
- Hegel, Friedrich Georg Wilhelm. _The Science of Logic_. Translated by George
di Giovanni, Cambridge University Press, 2010.

## Secondary

- Burbidge, John. _On Hegel's Logic: Fragments of A Commentary_. Humanities Press, 1981.
- Houlgate, Stephen. _Hegel on Being_. _Quality and the Birth of Quantity in Hegel's Science of Logic_ Volume 1. Bloomsbury Academic, 2022.
- McTaggart, John. _A Commentary on Hegel's Logic_. Cambridge University Press, 1910.
- Burbidge, John. _On Hegel's Logic: Fragments of A Commentary_. Humanities
Press, 1981.
- Houlgate, Stephen. _Hegel on Being_. _Quality and the Birth of Quantity in
Hegel's Science of Logic_ Volume 1. Bloomsbury Academic, 2022.
- McTaggart, John. _A Commentary on Hegel's Logic_. Cambridge University
Press, 1910.
23 changes: 14 additions & 9 deletions logs/deprecated/fancy-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,28 @@ console.log(a);

## Component

import { useState } from 'react'
import { useState } from "react";

{/* Import CSS modules */}

export const Counter = () => {
const [count, setCount] = useState(0);
return (
<div>
<button onClick={() => setCount(count + 1)} className="bg-blue-500 hover:bg-red-500 duration-1000 p-4">Clicked {count} times</button>
</div>
);
const [count, setCount] = useState(0);
return (
<div>
<button
onClick={() => setCount(count + 1)}
className="bg-blue-500 hover:bg-red-500 duration-1000 p-4"
>
Clicked {count} times
</button>
</div>
);
};

<Counter/>
<Counter />

## External Component

import {Counters} from '../../src/components/test/Counters'
import { Counters } from "../../src/components/test/Counters";

<Counters />
26 changes: 13 additions & 13 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
images: {
unoptimized: true
},
distDir: "build",
}
output: "export",
reactStrictMode: true,
images: {
unoptimized: true,
},
distDir: "build",
};

const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
// options
// flexsearch: true,
// staticImage: true,
// defaultShowCopyCode: true,
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
// options
// flexsearch: true,
// staticImage: true,
// defaultShowCopyCode: true,
});

module.exports = withNextra(nextConfig);
Loading

0 comments on commit 1c77fa7

Please sign in to comment.