diff --git a/blog/2019-05-28-first-blog-post.md b/blog/2019-05-28-first-blog-post.md deleted file mode 100644 index 02f3f81..0000000 --- a/blog/2019-05-28-first-blog-post.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -slug: first-blog-post -title: First Blog Post -authors: - name: Gao Wei - title: Docusaurus Core Team - url: https://github.com/wgao19 - image_url: https://github.com/wgao19.png -tags: [hola, docusaurus] ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/blog/2019-05-29-long-blog-post.md b/blog/2019-05-29-long-blog-post.md deleted file mode 100644 index 26ffb1b..0000000 --- a/blog/2019-05-29-long-blog-post.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: long-blog-post -title: Long Blog Post -authors: endi -tags: [hello, docusaurus] ---- - -This is the summary of a very long blog post, - -Use a `` comment to limit blog post size in the list view. - - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/blog/2021-08-01-mdx-blog-post.mdx b/blog/2021-08-01-mdx-blog-post.mdx deleted file mode 100644 index c04ebe3..0000000 --- a/blog/2021-08-01-mdx-blog-post.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: mdx-blog-post -title: MDX Blog Post -authors: [slorber] -tags: [docusaurus] ---- - -Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). - -:::tip - -Use the power of React to create interactive blog posts. - -```js - -``` - - - -::: diff --git a/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg b/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg deleted file mode 100644 index 11bda09..0000000 Binary files a/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg and /dev/null differ diff --git a/blog/2021-08-26-welcome/index.md b/blog/2021-08-26-welcome/index.md deleted file mode 100644 index 9455168..0000000 --- a/blog/2021-08-26-welcome/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: welcome -title: Welcome -authors: [slorber, yangshun] -tags: [facebook, hello, docusaurus] ---- - -[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). - -Simply add Markdown files (or folders) to the `blog` directory. - -Regular blog authors can be added to `authors.yml`. - -The blog post date can be extracted from filenames, such as: - -- `2019-05-30-welcome.md` -- `2019-05-30-welcome/index.md` - -A blog post folder can be convenient to co-locate blog post images: - -![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg) - -The blog supports tags as well! - -**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config. diff --git a/blog/2024-01-9-welcome/index.md b/blog/2024-01-9-welcome/index.md new file mode 100644 index 0000000..589297c --- /dev/null +++ b/blog/2024-01-9-welcome/index.md @@ -0,0 +1,16 @@ +--- +slug: Welcome +title: Welcome +authors: [miles] +tags: [welcome] +--- + +Welcome to PineappleDevelopment's Official Blog! + +I don't really yet know what we will be writing about here. But, if I ever have things on my mind I will write a blog about it. + +Anyways I've spent time upgrading my docs website now we officially have a logo. Granted this is subject to change over time, but I'm content with it as of now. If you want to learn about PineappleLib you can check that out [here](/pineapple-lib). + +Here is our logo + +![Logo](pineappledev.png) diff --git a/blog/2024-01-9-welcome/pineappledev.png b/blog/2024-01-9-welcome/pineappledev.png new file mode 100644 index 0000000..533c433 Binary files /dev/null and b/blog/2024-01-9-welcome/pineappledev.png differ diff --git a/blog/authors.yml b/blog/authors.yml index bcb2991..8167663 100644 --- a/blog/authors.yml +++ b/blog/authors.yml @@ -1,17 +1,5 @@ -endi: - name: Endilie Yacop Sucipto - title: Maintainer of Docusaurus - url: https://github.com/endiliey - image_url: https://github.com/endiliey.png - -yangshun: - name: Yangshun Tay - title: Front End Engineer @ Facebook - url: https://github.com/yangshun - image_url: https://github.com/yangshun.png - -slorber: - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png +miles: + name: Y2K_ | miles_dev + title: Pineapple Maintainer + url: https://miles.sh + image_url: https://github.com/Y2Kwastaken.png \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index edb2ddd..74447f7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -25,8 +25,8 @@ const remarkPluginsConfig = { /** @type {import('@docusaurus/types').Config} */ const config = { title: 'PineappleDevelopment', - tagline: 'Dinosaurs are cool', - favicon: 'img/favicon.ico', + tagline: 'Sweet', + favicon: 'img/pineapplefavicon.ico', // Set the production url of your site here url: 'https://docs.miles.sh/', @@ -104,9 +104,9 @@ const config = { }, }, navbar: { - title: 'My Site', + title: 'Pineapple Development', logo: { - alt: 'My Site Logo', + alt: 'Pineapple Development Logo', src: 'img/logo.svg', }, items: [ @@ -137,7 +137,7 @@ const config = { title: 'Docs', items: [ { - label: 'Tutorial', + label: 'PineappleLib', to: '/docs/libraries', }, ], @@ -145,17 +145,9 @@ const config = { { title: 'Community', items: [ - { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/docusaurus', - }, { label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'Twitter', - href: 'https://twitter.com/docusaurus', + href: 'https://discordapp.com/invite/NXW2FuQ6a5', }, ], }, @@ -168,12 +160,12 @@ const config = { }, { label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/PineappleDevelopmentGroup/', }, ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} PineappleDevelopmentGroup, Built with Docusaurus.`, }, prism: { theme: prismThemes.github, diff --git a/pineapple-lib/config.md b/pineapple-lib/config.md index d34bed9..8c5209f 100644 --- a/pineapple-lib/config.md +++ b/pineapple-lib/config.md @@ -187,7 +187,13 @@ public class PlayerData { The StringAdapter ```java title="PlayerDataAdapter.java" -public class PlayerDataAdapter implements StringAdapter{ +public class PlayerDataAdapter implements GenericStringAdapter { + + @Override + public Class getRuntimeType() { + return PlayerData.class; + } + @Override public String toString(PlayerData data) { return data.toString(); @@ -219,3 +225,86 @@ private void registerAdapter() { PineappleLib.getConfigurationManager().registerTypeAdapter(PlayerData.class, new PlayerDataAdapter()); } ``` + +### Complex Adapter + +The PlayerData class to serialize + +```java title="PlayerData.java" +public class PlayerData { + + private final UUID uuid; + private int kills = 0; + + public PlayerData(UUID uuid, int kills) { + this.uuid = uuid; + this.kills = kills; + } + + public UUID getUUID() { + return this.uuid; + } + + public int getKills() { + return this.kills; + } +} +``` + +The StringAdapter + +```java title="PlayerDataAdapter.java" +public class PlayerDataAdapter implements TypeAdapter, PlayerData> { + + @Override + public Class> getSavedType() { + return (Class>) (Object) Map.class; + } + + @Override + public Class> getRuntimeType() { + return (Class>) (Object) WeightedRandom.class; + } + + @Override + public PlayerData read(Map value) { + return new PlayerData(UUID.fromString(value.get("uuid").toString()), (Integer) value.get("kills")); + } + + @Override + public Map write(PlayerData value, Map existing, boolean replace) { + if (existing == null) { + existing = new HashMap<>(); + } + + if (!existing.containsKey("uuid") || replace) { + existing.put("uuid", value.getUUID().toString()); + } + + if (!existing.containsKey("kills") || replace) { + existing.put("kills", value.getKills()); + } + + return existing; + } +} +``` + +How it would look like used in a config: + +```java title="PluginSettings.java" +public class PluginSettings { + + @ConfigEntry("owner-data") + public static PlayerData OWNER_DATA = new PlayerData(UUID.randomUUID(), 20); + +} +``` + +How to register the adapter: + +```java +private void registerAdapter() { + PineappleLib.getConfigurationManager().registerTypeAdapter(PlayerData.class, new PlayerDataAdapter()); +} +``` diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js index acc7621..2e2d075 100644 --- a/src/components/HomepageFeatures/index.js +++ b/src/components/HomepageFeatures/index.js @@ -3,7 +3,7 @@ import Heading from '@theme/Heading'; import styles from './styles.module.css'; const FeatureList = [ - { + /*{ title: 'Easy to Use', Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( @@ -32,7 +32,7 @@ const FeatureList = [ be extended while reusing the same header and footer. ), - }, + },*/ ]; function Feature({Svg, title, description}) { diff --git a/src/css/custom.css b/src/css/custom.css index 54c9482..cc7da16 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,26 +6,26 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: #c88a1d; + --ifm-color-primary-dark: #9bcf1b; + --ifm-color-primary-darker: #84b017; + --ifm-color-primary-darkest: #3d7a51; + --ifm-color-primary-light: #9bcf1b; + --ifm-color-primary-lighter: #afeb17; + --ifm-color-primary-lightest: #b4f316; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme='dark'] { - --ifm-color-primary: #25c2a0; - --ifm-color-primary-dark: #21af90; - --ifm-color-primary-darker: #1fa588; - --ifm-color-primary-darkest: #1a8870; - --ifm-color-primary-light: #29d5b0; - --ifm-color-primary-lighter: #32d8b4; - --ifm-color-primary-lightest: #4fddbf; + --ifm-color-primary: #cdc560; + --ifm-color-primary-dark: #3d7a51; + --ifm-color-primary-darker: #356b47; + --ifm-color-primary-darkest: #2a5a3a; + --ifm-color-primary-light: #81a08c; + --ifm-color-primary-lighter: #b1d1bc; + --ifm-color-primary-lightest: #e5ffee; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } diff --git a/src/pages/index.js b/src/pages/index.js index 13089a6..b316cbc 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -19,8 +19,8 @@ function HomepageHeader() {
- Docusaurus Tutorial - 5min ⏱️ + to="/pineapple-lib"> + Getting Started With PineappleLib - 2min ⏱️
diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 9f71a5d..33d5817 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -2,7 +2,6 @@ * CSS files with the .module.css suffix will be treated as CSS modules * and scoped locally. */ - .heroBanner { padding: 4rem 0; text-align: center; diff --git a/static/img/docusaurus.png b/static/img/docusaurus.png deleted file mode 100644 index f458149..0000000 Binary files a/static/img/docusaurus.png and /dev/null differ diff --git a/static/img/favicon.ico b/static/img/favicon.ico deleted file mode 100644 index c01d54b..0000000 Binary files a/static/img/favicon.ico and /dev/null differ diff --git a/static/img/logo.svg b/static/img/logo.svg index 9db6d0d..357c115 100644 --- a/static/img/logo.svg +++ b/static/img/logo.svg @@ -1 +1,87 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/pineappledev.png b/static/img/pineappledev.png new file mode 100644 index 0000000..533c433 Binary files /dev/null and b/static/img/pineappledev.png differ diff --git a/static/img/pineapplefavicon.ico b/static/img/pineapplefavicon.ico new file mode 100644 index 0000000..f86ef01 Binary files /dev/null and b/static/img/pineapplefavicon.ico differ