" >> README.md
27 |
--------------------------------------------------------------------------------
/src/.vuepress/public/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Java Design Patterns Website [](https://app.netlify.com/sites/relaxed-kleicha-7210ed/deploys) [](https://gitter.im/iluwatar/java-design-patterns-vuepress-web?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2 |
3 |
4 |
5 |
6 |
7 |
8 | This repository contains the source code of Java Design Patterns website, powered by [Vuepress](https://vuepress.vuejs.org/). The website mainly pulls content from these sources:
9 | - https://github.com/iluwatar/java-design-patterns
10 | - https://github.com/iluwatar/30-seconds-of-java
11 | - https://github.com/iluwatar/programming-principles
12 |
13 | Running it locally is easy, just follow these steps:
14 |
15 | - Clone this repository
16 | - Install the dependencies `pnpm install`
17 | - Prepare the content `pnpm run generate`
18 | - Run the local development server `pnpm run dev`
19 | - Access the website `http://localhost:8080/`
20 |
--------------------------------------------------------------------------------
/src/zh/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | blog: false
3 | home: true
4 | icon: home
5 | title: Java Design Patterns
6 | heroImage: /coffee.svg
7 | heroText: 软件设计模式,编程原则还有代码片段
8 | tagline: 最好的设计师会使用许多相互吻合和交织的设计模式,以产生更大的整体 --Erich Gamma
9 | heroFullScreen: false
10 | action:
11 | - text: 学习设计模式 💡
12 | link: /zh/patterns/
13 | type: primary
14 | features:
15 | - title: 设计模式
16 | details: 学习世界上最大的用 Java 实现的软件设计模式集合。
17 | link: /zh/patterns/
18 | icon: home
19 | - title: 软件设计原则
20 | details: 软件设计有一定的普遍规律和原则来指导实施者。
21 | link: /zh/principles/
22 | icon: certificate
23 | - title: 代码片段
24 | details: 30秒钟Java是一组可重用、经过测试、可复制粘贴的 Java 17 兼容代码片段,您可以在 30 秒或更短的时间内理解这些代码片段。
25 | link: /zh/snippets/
26 | icon: code
27 | footer: MIT licensed
28 | ---
29 |
30 | # 介绍
31 |
32 | 设计模式是程序员在设计应用程序或系统时可以用来解决常见问题的最佳形式化实践。
33 | 设计模式可以通过提供经过测试的、经过验证的开发范例来加速开发过程。
34 | 重用设计模式有助于防止导致重大问题的细微问题,并且还提高了熟悉这些模式的编码人员和架构师的代码可读性。
35 |
36 | # 开始
37 |
38 | 该站点展示了基于 Java 的设计模式、原则和代码片段。 这些解决方案由来自开源社区的经验丰富的程序员和架构师开发。 这些模式可以通过它们的高级描述或通过查看它们的源代码来浏览。 源代码示例有很好的注释,可以被认为是关于如何实现特定模式的编程教程。 我们使用最流行的久经考验的开源 Java 技术。
39 | 希望您发现本网站上提供的面向对象的解决方案对您的体系结构很有用,并且在学习它们时和我们开发它们时一样有趣。
40 |
41 | # 如何贡献
42 |
43 | 该网站是开源社区工作的结果。 要对内容做出贡献,请按照下面的 Github 仓库链接进行操作。
44 |
45 | - [Website](https://github.com/iluwatar/java-design-patterns-vuepress-web)
46 | - [Design Patterns](https://github.com/iluwatar/java-design-patterns)
47 | - [Software design principles](https://github.com/iluwatar/programming-principles)
48 | - [Snippets](https://github.com/iluwatar/30-seconds-of-java)
49 |
--------------------------------------------------------------------------------
/src/.vuepress/config.ts:
--------------------------------------------------------------------------------
1 | import { webpackBundler } from '@vuepress/bundler-webpack'
2 | import { defineUserConfig } from "vuepress";
3 | import theme from "./theme.js";
4 | import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
5 | import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
6 |
7 | export default defineUserConfig({
8 | base: "/",
9 |
10 | bundler: webpackBundler({
11 | postcss: {},
12 | vue: {},
13 | }),
14 |
15 | title: "Java Design Patterns",
16 | description: "Design patterns are best practices a programmer can use to solve common problems when designing an application or system.",
17 |
18 | locales: {
19 | "/": {
20 | lang: "en-US",
21 | title: "Java Design Patterns",
22 | description: "Java Design Patterns (English)",
23 | },
24 | "/zh/": {
25 | lang: "zh-CN",
26 | title: "Java Design Patterns (中文)",
27 | description: "",
28 | },
29 | "/ko/": {
30 | lang: "ko-KR",
31 | title: "Java Design Patterns (한국어)",
32 | description: "",
33 | },
34 | "/es/": {
35 | lang: "es-ES",
36 | title: "Patrones de Diseño Java",
37 | description: "Patrones de Diseño Java (Español)",
38 | },
39 | },
40 |
41 | theme,
42 |
43 | shouldPrefetch: false,
44 |
45 | plugins: [
46 | googleAnalyticsPlugin({
47 | id: 'G-CN4DXNE50P',
48 | }),
49 | registerComponentsPlugin({
50 | componentsDir: 'src/.vuepress/components',
51 | }),
52 | ],
53 |
54 | });
55 |
--------------------------------------------------------------------------------
/src/ko/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | blog: false
3 | home: true
4 | icon: home
5 | title: Java Design Patterns
6 | heroImage: /coffee.svg
7 | heroText: 소프트웨어 디자인 패턴, 원칙 및 스니펫
8 | tagline: 최고의 디자이너는 더 큰 전체를 생산하기 위해 얽히고 얽힌 많은 디자인 패턴을 사용할 것입니다. --Erich Gamma
9 | heroFullScreen: false
10 | action:
11 | - text: 디자인 패턴 연구 💡
12 | link: /patterns/
13 | type: primary
14 | features:
15 | - title: 디자인 패턴
16 | details: Java로 구현된 세계 최대의 소프트웨어 디자인 패턴 모음을 학습합니다.
17 | link: /patterns/
18 | icon: home
19 | - title: 소프트웨어 설계 원칙
20 | details: 소프트웨어 디자인에는 구현자를 안내하는 특정 보편적인 법칙과 원칙이 있습니다.
21 | link: /principles/
22 | icon: certificate
23 | - title: 코드 조각
24 | details: 30 Seconds of Java는 30초 이내에 이해할 수 있는 재사용, 테스트, 복사-붙여넣기 가능한 Java 17 호환 코드 조각 모음입니다.
25 | link: /snippets/
26 | icon: code
27 | ---
28 |
29 | # 소개
30 |
31 | 디자인 패턴은 프로그래머가 사용할 수 있는 최고의 공식화 방법입니다.
32 | 응용 프로그램이나 시스템을 설계할 때 일반적인 문제를 해결합니다.
33 |
34 | 디자인 패턴은 테스트되고 입증된 정보를 제공하여 개발 프로세스의 속도를 높일 수 있습니다.
35 | 개발 패러다임.
36 |
37 | 디자인 패턴을 재사용하면 주요 원인이 되는 미묘한 문제를 방지할 수 있습니다.
38 | 문제를 해결하고 코드 가독성을 향상시키는
39 | 패턴에 익숙하다.
40 |
41 | # 시작하기
42 |
43 | 이 사이트는 Java 기반 디자인 패턴, 원칙 및 코드 조각을 보여줍니다. 그만큼
44 | 경험이 풍부한 프로그래머와 건축가가 솔루션을 개발했습니다.
45 | 오픈 소스 커뮤니티. 패턴은 높은 수준의 설명으로 찾아볼 수 있습니다.
46 | 또는 소스 코드를 살펴봄으로써. 소스 코드 예제는 주석 처리가 잘 되어 있으며
47 | 특정 패턴을 구현하는 방법에 대한 프로그래밍 자습서로 생각할 수 있습니다. 우리
48 | 전투에서 입증된 가장 인기 있는 오픈 소스 Java 기술을 사용합니다.
49 |
50 | 이 사이트에 제공된 객체 지향 솔루션이 유용하기를 바랍니다.
51 | 당신의 아키텍처에서 우리가 그것들을 개발하는 것만큼 재미있게 배우십시오.
52 |
53 | # 기여 방법
54 |
55 | 웹사이트는 오픈 소스 커뮤니티의 작업 결과입니다. 기부하다
56 | 내용을 보려면 아래 Github 저장소 링크를 따르십시오.
57 |
58 | - [Website](https://github.com/iluwatar/java-design-patterns-vuepress-web)
59 | - [Design Patterns](https://github.com/iluwatar/java-design-patterns)
60 | - [Software design principles](https://github.com/iluwatar/programming-principles)
61 | - [Snippets](https://github.com/iluwatar/30-seconds-of-java)
62 |
--------------------------------------------------------------------------------
/generate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -x
4 |
5 | ROOT_DIR=$(pwd)
6 | DOCS_DIR=$ROOT_DIR/src
7 | cd $DOCS_DIR
8 |
9 | # Setup java-design-patterns - English
10 | rm -rf java-design-patterns
11 | rm -rf patterns
12 | rm -rf zh/patterns
13 | git clone https://github.com/iluwatar/java-design-patterns.git
14 | cd java-design-patterns
15 | git checkout-index -a -f --prefix=../patterns/
16 | cd ../patterns
17 | rm -rf etc .circleci .editorconfig .github .mvn checkstyle-suppressions.xml CONTRIBUTING.MD LICENSE.md license-plugin-header-style.xml mvnw mvnw.cmd pom.xml PULL_REQUEST_TEMPLATE.md .all-contributorsrc .gitignore gpl-3.0.txt layers.log lgpl-3.0.txt lombok.config service-layer.log
18 | find . -maxdepth 2 -type d -exec bash -c 'cd "{}" && pwd && rm -rf src pom.xml *.ucls *.puml .gitignore' \;
19 |
20 | rm -vf README.md
21 | $ROOT_DIR/index.sh "en" "Design Pattern Catalog" "Catalog of Java Design Patterns for Developers" "Discover the full list of Java design patterns. This comprehensive guide provides you with all the information you need to master pattern implementation in your Java applications."
22 |
23 | # Setup java-design-patterns - localizations
24 | languages=( zh ko es )
25 | catalogs=( "设计模式目录" "디자인 패턴 카탈로그" "Catalogo de patrones de diseño" )
26 |
27 | iter=0
28 | for lan in "${languages[@]}"
29 | do
30 | cd localization/$lan
31 | mkdir -p ../../../$lan/patterns
32 | cp -vrf * ../../../$lan/patterns
33 | cd ../../../$lan/patterns
34 | rm -vf README.md
35 | $ROOT_DIR/index.sh "$lan" "${catalogs[$iter]}"
36 | cd ../../patterns
37 | iter=$((iter+1))
38 | done
39 |
40 | cd $DOCS_DIR
41 | rm -rf java-design-patterns
42 | rm -rf patterns/localization
43 |
44 | # setup programming-principles - English
45 | rm -rf programming-principles
46 | rm -rf principles
47 | rm -rf zh/principles
48 | git clone https://github.com/iluwatar/programming-principles.git
49 | cd programming-principles
50 | git checkout-index -f --prefix=../principles/ README.md
51 |
52 | # setup programming-principles - localizations
53 | languages=( zh ko es )
54 | for lan in "${languages[@]}"
55 | do
56 | mkdir ../$lan/principles
57 | cp -vf README.md ../$lan/principles/
58 | done
59 | cd ..
60 | rm -rf programming-principles
61 |
62 | # setup 30-seconds-of-java - English
63 | rm -rf 30-seconds-of-java
64 | rm -rf snippets
65 | rm -rf zh/snippets
66 | git clone https://github.com/iluwatar/30-seconds-of-java.git
67 | cd 30-seconds-of-java
68 | git checkout-index -f --prefix=../snippets/ README.md
69 |
70 | # setup 30-seconds-of-java - localizations
71 | languages=( zh ko es )
72 | for lan in "${languages[@]}"
73 | do
74 | mkdir ../$lan/snippets
75 | cp -vf localization/$lan/README.md ../$lan/snippets/
76 | done
77 | cd ..
78 | rm -rf 30-seconds-of-java
79 |
--------------------------------------------------------------------------------
/src/es/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | blog: false
3 | home: true
4 | icon: home
5 | title: Java Design Patterns
6 | heroImage: /coffee.svg
7 | heroText: Patrones, principios y fragmentos de diseño de software
8 | tagline: Los mejores diseñadores utilizan muchos patrones de diseño que encajan y se entrelazan para producir un todo mayor --Erich Gamma
9 | heroFullScreen: false
10 | actions:
11 | - text: Estudiar los patrones de diseño 💡
12 | link: /es/patterns/
13 | type: primary
14 | features:
15 | - title: Patrones de diseño
16 | details: Estudie la mayor colección del mundo de patrones de diseño de software implementados en Java.
17 | link: /es/patterns/
18 | icon: home
19 | - title: Principios de diseño de software
20 | details: El diseño de software se rige por ciertas leyes y principios universales.
21 | link: /es/principles/
22 | icon: certificate
23 | - title: Fragmentos de código
24 | details: 30 Seconds of Java es una colección de fragmentos de código reutilizables, probados y compatibles con Java 17 que se pueden copiar y pegar y que se pueden entender en 30 segundos o menos.
25 | link: /es/snippets/
26 | icon: code
27 | ---
28 |
29 | # Introducción
30 |
31 | Los patrones de diseño son las mejores prácticas formalizadas que un programador puede usar para resolver problemas
32 | comunes al diseñar una aplicación o sistema.
33 |
34 | Los patrones de diseño pueden acelerar el proceso de desarrollo al proporcionar paradigmas de desarrollo probados y
35 | comprobados.
36 |
37 | Reutilizar patrones de diseño ayuda a prevenir problemas sutiles que causan problemas mayores, y también mejora la
38 | legibilidad del código para los programadores y arquitectos que están familiarizados con los patrones.
39 |
40 | # Cómo empezar
41 |
42 | Este sitio muestra patrones de diseño basados en Java, principios y fragmentos de código. Las soluciones han sido
43 | desarrolladas por programadores y arquitectos experimentados de la comunidad de código abierto. Los patrones se pueden
44 | explorar por sus descripciones de alto nivel o mirando su código fuente. Los ejemplos de código fuente están bien
45 | comentados y se pueden considerar como tutoriales de programación sobre cómo implementar un patrón específico.
46 | Utilizamos las tecnologías Java de código abierto más populares y probadas en batalla.
47 |
48 | Esperamos que encuentres las soluciones orientadas a objetos presentadas en este sitio útiles en tus arquitecturas y te
49 | diviertas tanto aprendiéndolas como nosotros desarrollándolas.
50 |
51 | # Cómo contribuir
52 |
53 | El sitio web es el resultado del trabajo de la comunidad de código abierto. Para contribuir al contenido, por favor
54 | sigue los enlaces del repositorio de GitHub a continuación.
55 |
56 | - [Sitio web](https://github.com/iluwatar/java-design-patterns-vuepress-web)
57 | - [Patrones de diseño](https://github.com/iluwatar/java-design-patterns)
58 | - [Principios de diseño de software](https://github.com/iluwatar/programming-principles)
59 | - [Fragmentos](https://github.com/iluwatar/30-seconds-of-java)
60 |
--------------------------------------------------------------------------------
/src/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | blog: false
3 | home: true
4 | icon: home
5 | title: "Explore, Learn, and Master Industry-Standard Patterns"
6 | shortTitle: Java Design Patterns
7 | description: "Explore the comprehensive world of Java design patterns. Learn key patterns that every Java developer should know and master to build more robust and scalable applications."
8 | heroImage: /coffee.svg
9 | heroText: Software design patterns, principles, and snippets
10 | tagline: The best designers will use many design patterns that dovetail and intertwine to produce a greater whole --Erich Gamma
11 | heroFullScreen: false
12 | action:
13 | - text: Get the book 📖
14 | link: /book/
15 | type: primary
16 | - text: Study the design patterns 💡
17 | link: /patterns/
18 | type: default
19 | features:
20 | - title: Design Patterns
21 | details: Study the world's largest collection of software design patterns implemented in Java.
22 | link: /patterns/
23 | icon: home
24 | - title: Software Design Principles
25 | details: Software design has certain universal laws and principles to guide the implementors.
26 | link: /principles/
27 | icon: certificate
28 | - title: Code Snippets
29 | details: 30 Seconds of Java is a collection of reusable, tested, copy-pasteable Java 17 compatible code snippets that you can understand in 30 seconds or less.
30 | link: /snippets/
31 | icon: code
32 | - title: Book
33 | details: Open Source Java Design Patterns book provides a comprehensive guide to various design patterns used in Java programming, illustrated with real-world examples and detailed explanations.
34 | link: /book/
35 | icon: book
36 | ---
37 |
38 | # Introduction
39 |
40 | Design patterns are the best formalized practices a programmer can use to
41 | solve common problems when designing an application or system.
42 |
43 | Design patterns can speed up the development process by providing tested, proven
44 | development paradigms.
45 |
46 | Reusing design patterns help prevent subtle issues that cause major
47 | problems, and it also improves code readability for coders and architects who
48 | are familiar with the patterns.
49 |
50 | # Getting started
51 |
52 | This site showcases Java-based design patterns, principles, and code snippets. The
53 | solutions have been developed by experienced programmers and architects from the
54 | open source community. The patterns can be browsed by their high level descriptions
55 | or by looking at their source code. The source code examples are well commented and
56 | can be thought as programming tutorials on how to implement a specific pattern. We
57 | use the most popular battle-proven open source Java technologies.
58 |
59 | Hopefully you find the object oriented solutions presented on this site useful
60 | in your architectures and have as much fun learning them as we had developing them.
61 |
62 | # How to contribute
63 |
64 | The website is the result of the work of the open source community. To contribute
65 | to the content, please follow the Github repository links below.
66 |
67 | - [Website](https://github.com/iluwatar/java-design-patterns-vuepress-web)
68 | - [Design Patterns](https://github.com/iluwatar/java-design-patterns)
69 | - [Software design principles](https://github.com/iluwatar/programming-principles)
70 | - [Snippets](https://github.com/iluwatar/30-seconds-of-java)
71 |
--------------------------------------------------------------------------------
/src/book/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Official Java Design Patterns Book: Master Modern Java Coding Techniques"
3 | shortTitle: Java Design Patterns Book
4 | description: "Discover the ultimate Java Design Patterns book for mastering modern Java coding techniques. Learn from in-depth explanations, examples, and step-by-step guides in our essential guidebook."
5 | language: en
6 | ---
7 |
8 | # Get the Book
9 |
10 | ## For the Price of a Cup of Coffee ☕️, Unlock the Power of Advanced Java Development with "Open Source Java Design Patterns"
11 |
12 | **Are you a Java developer looking to elevate your coding skills and architectural knowledge?** Look no further than ["Open Source Java Design Patterns"](https://payhip.com/b/kcaF9), the essential guide for mastering the art of design patterns in Java. This comprehensive resource is your gateway to creating robust, maintainable, and scalable software systems.
13 |
14 | [](https://payhip.com/b/kcaF9)
15 |
16 | ## What's Inside?
17 |
18 | 1. **158 Design Patterns**:
19 | - Abstract Document
20 | - Abstract Factory
21 | - Active Object
22 | - And many more... [Get the free book sample from the store](https://payhip.com/b/kcaF9) to see the full table of contents.
23 |
24 | 2. **14 Categories**:
25 | - Architectural
26 | - Behavioral
27 | - Concurrency
28 | - And many more...
29 |
30 | 3. **79 Tags**:
31 | - Abstraction
32 | - Accumulation
33 | - Architecture
34 | - And many more...
35 |
36 | 4. **746 Pages**:
37 | - Comprehensive and detailed explanations.
38 | - Step-by-step tutorials.
39 | - Real-world examples.
40 | - Practical implementation tips.
41 | - Code snippets and diagrams.
42 |
43 | ## Why This Book?
44 |
45 | - **Comprehensive Coverage**: From creational to structural to behavioral patterns, this book covers every essential design pattern you need to know.
46 | - **Hands-On Examples**: Real-world examples and practical tutorials to help you apply each pattern in your projects.
47 | - **Expert Insights**: Learn from experienced Java developers and architects who share their best practices and tips.
48 | - **Scalability and Maintainability**: Discover patterns that make your code more scalable, maintainable, and adaptable to change.
49 |
50 | ## Transform Your Coding Practices
51 |
52 | Whether you're a beginner or an experienced developer, ["Open Source Java Design Patterns"](https://payhip.com/b/kcaF9) provides the knowledge and tools to transform your coding practices. Understand the principles behind each pattern and learn how to implement them effectively in your projects.
53 |
54 | ## Get Your Copy Today!
55 |
56 | Don't miss out on the opportunity to become a more skilled and efficient Java developer. Enhance your programming toolkit with ["Open Source Java Design Patterns"](https://payhip.com/b/kcaF9) and take your software development skills to the next level.
57 |
58 | **[Order now](https://payhip.com/b/kcaF9) and start your journey towards mastering Java design patterns!**
59 |
60 | ---
61 | By focusing on the key aspects and benefits of the book, this advertisement aims to attract both novice and seasoned Java developers interested in enhancing their skills and understanding of design patterns. If you have any specific details or highlights you want to include, feel free to let me know!
62 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at iluwatar@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/src/.vuepress/theme.ts:
--------------------------------------------------------------------------------
1 | import { hopeTheme } from "vuepress-theme-hope";
2 | import { enNavbar, koNavbar, zhNavbar, esNavbar } from "./navbar";
3 |
4 | export default hopeTheme({
5 | hostname: "https://java-design-patterns.com",
6 |
7 | author: {
8 | name: "iluwatar",
9 | url: "https://github.com/iluwatar/java-design-patterns-vuepress-web",
10 | },
11 |
12 | iconAssets: "fontawesome",
13 |
14 | logo: "/coffee.svg",
15 |
16 | repo: "iluwatar/java-design-patterns-vuepress-web",
17 |
18 | docsDir: "demo/theme-docs/src",
19 |
20 | pageInfo: ["Category", "Tag", "ReadingTime"],
21 |
22 | breadcrumb: false,
23 |
24 | locales: {
25 | "/": {
26 | navbar: enNavbar,
27 |
28 | sidebar: false,
29 |
30 | footer: "MIT licensed",
31 |
32 | displayFooter: true,
33 |
34 | editLink: false,
35 | },
36 |
37 | /**
38 | * Chinese locale config
39 | */
40 | "/zh/": {
41 | navbar: zhNavbar,
42 |
43 | sidebar: false,
44 |
45 | footer: "麻省理工學院許可",
46 |
47 | displayFooter: true,
48 |
49 | editLink: false,
50 | },
51 |
52 | /**
53 | * Korean locale config
54 | */
55 | "/ko/": {
56 | navbar: koNavbar,
57 |
58 | sidebar: false,
59 |
60 | footer: "MIT 라이센스",
61 |
62 | displayFooter: true,
63 |
64 | editLink: false,
65 | },
66 |
67 | /**
68 | * Spanish locale config
69 | */
70 | "/es/": {
71 | navbar: esNavbar,
72 |
73 | sidebar: false,
74 |
75 | footer: "Licencia MIT",
76 |
77 | displayFooter: true,
78 |
79 | editLink: false,
80 | },
81 |
82 | },
83 |
84 | plugins: {
85 | comment: {
86 | provider: "Giscus",
87 | repo: "iluwatar/java-design-patterns-vuepress-web",
88 | repoId: "MDEwOlJlcG9zaXRvcnkzMzAyMTk3NjE=",
89 | category: "Announcements",
90 | categoryId: "DIC_kwDOE67A8c4B_2Ud",
91 | },
92 |
93 | blog: true,
94 |
95 | // Disable features you don’t want here
96 | mdEnhance: {
97 | align: true,
98 | attrs: true,
99 | chart: true,
100 | codetabs: true,
101 | container: true,
102 | demo: true,
103 | echarts: true,
104 | flowchart: true,
105 | gfm: true,
106 | imageLazyload: true,
107 | imageTitle: true,
108 | imageSize: true,
109 | include: true,
110 | katex: true,
111 | mark: true,
112 | mermaid: true,
113 | playground: {
114 | presets: ["ts", "vue"],
115 | },
116 | presentation: {
117 | plugins: ["highlight", "math", "search", "notes", "zoom"],
118 | },
119 | stylize: [
120 | {
121 | matcher: "Recommended",
122 | replacer: ({ tag }) => {
123 | if (tag === "em")
124 | return {
125 | tag: "Badge",
126 | attrs: { type: "tip" },
127 | content: "Recommended",
128 | };
129 | },
130 | },
131 | ],
132 | sub: true,
133 | sup: true,
134 | tabs: true,
135 | vPre: true,
136 | vuePlayground: true,
137 | },
138 |
139 | pwa: {
140 | favicon: "/favicon.ico",
141 | cacheHTML: true,
142 | cachePic: true,
143 | appendBase: true,
144 | apple: {
145 | icon: "/assets/icon/apple-icon-152.png",
146 | statusBarColor: "black",
147 | },
148 | msTile: {
149 | image: "/assets/icon/ms-icon-144.png",
150 | color: "#ffffff",
151 | },
152 | manifest: {
153 | icons: [
154 | {
155 | src: "/assets/icon/chrome-mask-512.png",
156 | sizes: "512x512",
157 | purpose: "maskable",
158 | type: "image/png",
159 | },
160 | {
161 | src: "/assets/icon/chrome-mask-192.png",
162 | sizes: "192x192",
163 | purpose: "maskable",
164 | type: "image/png",
165 | },
166 | {
167 | src: "/assets/icon/chrome-512.png",
168 | sizes: "512x512",
169 | type: "image/png",
170 | },
171 | {
172 | src: "/assets/icon/chrome-192.png",
173 | sizes: "192x192",
174 | type: "image/png",
175 | },
176 | ],
177 | shortcuts: [
178 | {
179 | name: "Demo",
180 | short_name: "Demo",
181 | url: "/demo/",
182 | icons: [
183 | {
184 | src: "/assets/icon/guide-maskable.png",
185 | sizes: "192x192",
186 | purpose: "maskable",
187 | type: "image/png",
188 | },
189 | {
190 | src: "/assets/icon/guide-monochrome.png",
191 | sizes: "192x192",
192 | purpose: "monochrome",
193 | type: "image/png",
194 | },
195 | ],
196 | },
197 | ],
198 | },
199 | },
200 | },
201 | });
202 |
--------------------------------------------------------------------------------
/src/.vuepress/public/coffee.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------