在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:WordPress/openverse-frontend开源软件地址:https://github.com/WordPress/openverse-frontend开源编程语言:Vue 41.6%开源软件介绍:Project Board | Community Site | #openverse @ Slack | Handbook | Figma Mockups | Figma Design Library Openverse FrontendThis repository is the frontend UI for accessing and exploring the openly-licensed content provided by the Openverse API. You can view the application live on WordPress.org. You can also view the production Storybook TechnologyThe frontend app is built using Vue.js and Nuxt.js. Local DevelopmentNote for Windows users: Please use WSL for developing on the Openverse frontend. Several scripts, primarily support scripts, rely on a general *nix type environment. Maintaining parity for cross platform scripts proved complicated without significant duplication. If you run into issues with running the Openverse frontend in WSL please let us know by opening an issue or joining us on Slack in the We use Volta to manage our local environment tools. Please install it using the instructions on their website. Once you have volta installed, manually install volta install pnpm Run the following commands in order to have the code up and running on your machine: # Builds and serves assets with hot-reload
# Automatically invokes pnpm install and pnpm i18n
pnpm dev
Using HTTPS LocallyTo enable SSL support in local development, use the localhost+1-key.pem # The private key file
localhost+1.pem # The certificate file The easiest way to create these files is with a local development tool called mkcert. First make sure you have mkcert installed and activated with mkcert localhost 192.168.50.119 Be sure to replace the IP address in the example with your own. See the next section for how to identify that IP address. Finding your local IP addressYou can find the local IP address Nuxt uses by looking at the output of # ╭────────────────────────────────────────────╮
# │ │
# │ Nuxt @ v2.15.8 │
# │ │
# │ ▸ Environment: development │
# │ ▸ Rendering: server-side │
# │ ▸ Target: server │
# │ │
# │ Listening: http://192.168.50.119:8443/ │ # <-- Use this IP Address
# │ │
# ╰────────────────────────────────────────────╯ You will need to regenerate the certificate if this IP address changes for any reason, like by enabling a VPN or changing networks. Choosing which API to useYou don't need to have the Openverse API running locally to be able to run the frontend application. It's configured to communicate, by default, with the production API that's already publicly available. If you need to test against changes in your local API, set the API_URL=http://localhost:8000 pnpm dev Standalone and embedded modesThe application can run in two modes. By default, it runs in embedded mode, which is loaded in an iframe on WordPress.org/openverse. It has a small header without logo and no footer.
The standalone mode which has a large header with logo and a footer, can be enabled by adding Running testsRefer to the localhost tunnelingIf you want to make your local development server accessible to the internet (for testing or showing someone something you're working on), you can use
If you need to run an HTTP version (for example, if you're testing against third-party websites that do not accept the self-signed certificate generated by the dev server), run the dev server using
Docker and Openverse frontendWe do not currently support local development using Docker or However, we do build and actively deploy the frontend using Docker images. If you wish to build the production image for yourself, run the following: docker build . -t openverse-frontend:latest You can also find the latest You can then run using either the locally built image or the docker run -it -p 127.0.0.1:8443:8443/tcp openverse-frontend:latest The app will be available at http://localhost:8443. Formatting and LintingThe code in this repository is formatted using You will need to fix any linting issues before committing. We recommend formatting your JavaScript files on save in your text editor. You can learn how to do this in Visual Studio Code here. File name conventionsAll files and folders should be written in Redirects
ContributingPull requests are welcome! Feel free to join us on Slack and discuss the project with the engineers and community members on #openverse. You are welcome to take any open issue in the tracker labeled AcknowledgmentsOpenverse, previously known as CC Search, was conceived and built at Creative Commons. We thank them for their commitment to open source and openly licensed content, with particular thanks to previous team members @ryanmerkley, @janetpkr, @lizadaly, @sebworks, @pa-w, @kgodey, @annatuma, @mathemancer, @aldenstpage, @brenoferreira, and @sclachar, along with their community of volunteers. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论